HipByte / RubyMotionSamples

A collection of RubyMotion applications for code samples.
http://www.rubymotion.com
1.21k stars 341 forks source link

ERROR! Cannot install an app built for API version 22 on a device running API version 19 #63

Open pickhardt opened 9 years ago

pickhardt commented 9 years ago

I'm getting the following error when I try to run these examples on my Android: ERROR! Cannot install an app built for API version 22 on a device running API version 19

Where in the project files does it specify version 22, and can I just change that to 19? According to this Wikipedia chart, maybe only 1% of phones are on version 22 currently anyway https://en.wikipedia.org/wiki/Android_version_history

pickhardt commented 9 years ago

So I figured out the problem. RubyMotion was trying to compile it to the most recent Android version, which isn't really popular or used by my phone.

The solution was to add these to the Rakefile:

    app.target_api_version = "15"
    app.api_version = "15"

Honestly, you guys should probably add these to the Rakefiles in these examples, otherwise new users are going to get confused.

meissadia commented 8 years ago

Thank you @pickhardt!

iOS:

app.deployment_target = '9.3'