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

Android support? #36

Open
rafaeliga opened this issue Aug 17, 2016 · 3 comments
Open

Android support? #36

rafaeliga opened this issue Aug 17, 2016 · 3 comments

Comments

@rafaeliga
Copy link

Hello,

Is there any chance of this gem get Android support?

Or any alternatives for "cattr_accessor", for example?

Thanks,

@tkadauke
Copy link
Contributor

I don't have an Android device, so I'm not sure how much I can help you. What exactly is the problem when you use motion-support with Android? Off the top of my head, not a lot should be incompatible with Android.

You should be able to cherry-pick what you want from motion-support. cattr_accessor can be used via:

require 'motion-support/core_ext/class'

See the readme for details. Let me know if that works for you.

@rafaeliga
Copy link
Author

I see, Im going to try to require only "cattr_accessor", but the error that Im getting is this one:

error: Helper has private access in EditorCompat
public class Callback extends java.lang.Object implements com.android.internal.util.Predicate, android.support.v4.content.SharedPreferencesCompat.EditorCompat.Helper, com.android.volley.RequestQueue.RequestFilter {

You can see that Im using Volley for network requests, I'll try to remove Volley to see if that is the issue too, thanks.

@rafaeliga
Copy link
Author

Gemfile:

gem 'motion-support', require: false

Then I added to Rakefile:

require 'motion-support/core_ext/class'

The error that I got is:

Exception raised: NoMethodError: undefined method extract_options!' for [:manager]:Array 08-18 18:01:18.999 22129 22129 E br/com/rubythree/hello: from attribute_accessors.rb:31 incattr_reader'
08-18 18:01:18.999 22129 22129 E br/com/rubythree/hello: from attribute_accessors.rb:165 in cattr_accessor' 08-18 18:01:18.999 22129 22129 E br/com/rubythree/hello: from user_manager.rb:3 inrb_scope2'
08-18 18:01:18.999 22129 22129 E br/com/rubythree/hello: from user_manager.rb:1 in `rb_scope1'

I see that extract_options is a method from Array, then I added to Rakefile:

require 'motion-support/core_ext/array'

and I get the error:

Exception raised: NoMethodError: undefined method class_exec' for UserManager:java.lang.Class 08-18 18:04:05.738 23007 23007 E br/com/rubythree/hello: from attribute_accessors.rb:34 inblock in cattr_reader'
08-18 18:04:05.738 23007 23007 E br/com/rubythree/hello: from attribute_accessors.rb:32 in cattr_reader' 08-18 18:04:05.738 23007 23007 E br/com/rubythree/hello: from attribute_accessors.rb:165 incattr_accessor'
08-18 18:04:05.738 23007 23007 E br/com/rubythree/hello: from user_manager.rb:3 in rb_scope2' 08-18 18:04:05.738 23007 23007 E br/com/rubythree/hello: from user_manager.rb:1 inrb_scope1'
08-18 18:04:05.738 23007 23007 E br/com/rubythree/hello: Uncaught exception when initializing `user_manager.rb.armv7.o' scope -- aborting

and now I dont know whats the next to include :D

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