-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reddit sample project won't build in android version 19 #22
Comments
Looks like the methods we use were introduced in API 21: https://developer.android.com/reference/android/net/ConnectivityManager.html Maybe we should disable that Flow API if we target an Android API lower than 21? |
Is it possible to support lower versions by excluding some of the libraries? It's important due to current adoption rates https://developer.android.com/about/dashboards/index.html#Platform |
Of course it's possible, we just need to programmatically check the version of Android and define the API accordingly. If you would like to submit a patch feel free! |
Actually it might be better to do that at build time. We could isolate the problematic code in a .rb file and remove it from |
I would like to have tests working on Android in RM before doing this kind of api version fixes, so we can start tests with different api platforms, otherwise it will become a nightmare to maintain. |
Works fine for android 23.
Built from f538de3
changed
app.api_version = "23"
to
app.api_version = "19"
in config/android.rb
received following error during rake android:emulator
build/android/Development-19/java/com/yourcompany/reddit/ReachabilityDelegate.java:6: error: ConnectivityManager() is not public in ConnectivityManager; cannot be accessed from outside package
public ReachabilityDelegate() { super(); }
^
1 error
3 warnings
rake aborted!
Command failed with status (1): [/usr/bin/javac -d "build/android/Developme...]
/Users/tbomb/.rvm/gems/ruby-2.2.1/gems/rake-11.2.2/lib/rake/file_utils.rb:69:in
block in create_shell_runner' /Users/tbomb/.rvm/gems/ruby-2.2.1/gems/rake-11.2.2/lib/rake/file_utils.rb:59:in
call'/Users/tbomb/.rvm/gems/ruby-2.2.1/gems/rake-11.2.2/lib/rake/file_utils.rb:59:in
sh' /Users/tbomb/.rvm/gems/ruby-2.2.1/gems/rake-11.2.2/lib/rake/file_utils_ext.rb:37:in
sh'/Library/RubyMotion/lib/motion/project/template/android.rb:537:in
block (2 levels) in <top (required)>' /Library/RubyMotion/lib/motion/project/paralel_builder.rb:47:in
call'/Library/RubyMotion/lib/motion/project/paralel_builder.rb:47:in `block (2 levels) in initialize'
Tasks: TOP => build
The text was updated successfully, but these errors were encountered: