Skip to content
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

hash with indifferent access fails with undefined method_defined? on Android #43

Open
davetrollope-fsml opened this issue Mar 31, 2019 · 1 comment

Comments

@davetrollope-fsml
Copy link

Using @wndxlori PR #42 to resolve relative path issues, I get the following error when requiring motion-support/core_ext on a brand new project:

03-31 17:52:38.106 2099 2099 E com/yourcompany/hello: Exception raised: NoMethodError: undefined method method_defined?' for Class:Class 03-31 17:52:38.108 2099 2099 E com/yourcompany/hello: from /Users/davetrollope/.gems/bundler/gems/motion-support-3fedd0920d88/motion/hash_with_indifferent_acc 03-31 17:52:38.108 2099 2099 E com/yourcompany/hello: from /Users/davetrollope/.gems/bundler/gems/motion-support-3fedd0920d88/motion/hash_with_indifferent_acc 03-31 17:52:38.110 2099 2099 E com/yourcompany/hello: Uncaught exception when initializing hash_with_indifferent_access.rb.x86.o' scope -- aborting
--------- beginning of crash
03-31 17:52:38.114 2099 2099 E AndroidRuntime: FATAL EXCEPTION: main
03-31 17:52:38.114 2099 2099 E AndroidRuntime: Process: com.yourcompany.hello, PID: 2099
03-31 17:52:38.114 2099 2099 E AndroidRuntime: java.lang.UnsatisfiedLinkError: JNI_ERR returned from JNI_OnLoad in "/data/app/com.yourcompany.hello-uxty06nv7-kMBV1yHlleMg==/lib/x86/libpayload.so"
03-31 17:52:38.114 2099 2099 E AndroidRuntime: at java.lang.Runtime.loadLibrary0(Runtime.java:1016)
03-31 17:52:38.114 2099 2099 E AndroidRuntime: at java.lang.System.loadLibrary(System.java:1657)
03-31 17:52:38.114 2099 2099 E AndroidRuntime: at com.yourcompany.hello.MainActivity.(MainActivity.java:10)
03-31 17:52:38.114 2099 2099 E AndroidRuntime: at java.lang.Class.newInstance(Native Method)
03-31 17:52:38.114 2099 2099 E AndroidRuntime: at android.app.Instrumentation.newActivity(Instrumentation.java:1173)
03-31 17:52:38.114 2099 2099 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2708)
03-31 17:52:38.114 2099 2099 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892)
03-31 17:52:38.114 2099 2099 E AndroidRuntime: at android.app.ActivityThread.-wrap11(Unknown Source:0)
03-31 17:52:38.114 2099 2099 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593)
03-31 17:52:38.114 2099 2099 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:105)
03-31 17:52:38.114 2099 2099 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164)
03-31 17:52:38.114 2099 2099 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6541)
03-31 17:52:38.114 2099 2099 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
03-31 17:52:38.114 2099 2099 E AndroidRuntime: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
03-31 17:52:38.114 2099 2099 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)

Steps:
create a new project: motion create --template=android Hello
Add to Gemfile: gem 'motion-support', git: 'https://github.com/wndxlori/motion-support.git', ref: '3fedd09', require: false
Add to Rakefile: require 'motion-support/core_ext'
Then run bundle and bundle exec rake
motion --version: 5.17 on mohave

@andrewhavens andrewhavens added this to the Android Support milestone Sep 20, 2019
@andrewhavens
Copy link
Contributor

This gem was originally written prior to RubyMotion Android support, but we can work towards adding Android support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants