Errors on Getting Started


I am going through the “Getting Started” for Android and I am stuck on 6. Hello World.

I have literally been Googling things for 2 or 3 hours trying to figure this out. When I run rake device I get this error:

ERROR! app.sdk_path should point to a valid Android SDK directory. Run 'motion android-setup' to install the latest SDK version.

Of course I have run motion android-setup multiple times at this point and it makes no difference. A couple times I have run rake device and got a different error:

./build/Development-27/java/com/yourcompany/hello/ cannot access bad class file: android/app/Activity.class(android/app:Activity.class) class file has wrong version 52.0, should be 50.0 Please remove or make sure it appears in the correct subdirectory of the classpath.

I am not sure what to do. Any help would be appreciated.


@jtruman What’s the output when you type ls ~/.rubymotion-android?

Aside: For really really fast help/trouble shooting, definitely come to the Slack channel:


Here’s what I get when I run that command:

ls: /Users/jtruman/.rubymotion-android?: No such file or directory


Posting here for posterity:

Make sure you don’t have an proxies are firewalls that would restrict the downloads of SDKs.

Try using the visual SDK Manager and see if it downloads successfully from there (the motion android-setup command just uses the cli version of SDK Manager).

If that doesn’t work, try downloading Android Studio (to see if that succeeds). We can then extract the SDKs from there.


So it turns out the solution was to get Java 1.8 installed. Once this was done, rake emulator worked just fine. Here is a link to Java 1.8 download:

Thanks @amirrajan for all the help on Slack!