-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
RN0.29 compatability #363
RN0.29 compatability #363
Conversation
… ensuring sony xperia android 6 compatability
Thanks for the PR! |
Hey, should the path of the file to update be pointing to |
Oops! I didn't see this and ended up submitting #366 |
I don't think you need to pass context through again and can use ThemeReactContext. Take a look at my PR if you get a chance. Maybe we can consolidate both our ideas into this PR and close mine out? |
@julien-rodrigues Yes, the docs would have to be updated for 0.29. We can use https://github.com/Microsoft/react-native-code-push#plugin-configuration-android |
@christopherdro Indeed it seems a great solution |
@@ -1,5 +1,4 @@ | |||
apply plugin: 'com.android.library' | |||
apply from: 'gradle-maven-push.gradle' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this change seems unrelated
I'd like to get a release out for 0.29, so I'm going to go ahead and merge this. There's some gradle stuff that we might tweak before publishing though. Thanks @locly for your contribution! |
I'm getting an Android compile error now using rn 0.29.1:
Any idea what might cause this? What exactly are the install instructions for android now? |
It's because we now require explicitly version 0.29. As stated above |
React native 0.29 has some changes to the way they initialize libraries, which means they are initialized from the
Application
rather than theMainActivity
. We added the Activity as a constructor argument toMapsPackage
in PR#276 to fix Sony Xperia devices with Android 6.0 crashing #271.After some experimentation and testing we've found that if you supply
ReactContext.getBaseContext()
to the Google Maps API you can get away with not needing the MainActivity. I have also left thepublic MapsPackage(Activity activity) { }
constructor for backwards compatibility, but if you'd rather this was removed, let me know and I'll update the PR.I've also updated the
build.gradle
file as per #359 to get the lib building with RN0.29.Tested with:
Nexus 6P
Nexus 5
Sony Xperia z5 compact