react-native-maps: Not compatible with react-native-push-notification
Hi, my project is use react-native-push-notification and react-native-maps. Previously my project already configured to use react-native-push-notification, and it’s work. But when I try insert react-native-maps, I got an error. I have guess something is wrong with my configuration. So I have do some experiment.
First, I fork your repo, and I can run your Example project in my android. But when I try to add react-native-push-notification on your Example project, I got same error.
D/dalvikvm( 8529): DexOpt: unable to opt direct call 0x8dfc at 0x7e in Lcom/airbnb/android/react/maps/AirMapManager;.receiveCommand
W/dalvikvm( 8529): Unable to resolve superclass of Lcom/google/android/gms/maps/model/LatLng; (4130)
W/dalvikvm( 8529): Link of class 'Lcom/google/android/gms/maps/model/LatLng;' failed
D/dalvikvm( 8529): DexOpt: unable to opt direct call 0x8def at 0xbc in Lcom/airbnb/android/react/maps/AirMapManager;.receiveCommand
W/dalvikvm( 8529): threadid=12: thread exiting with uncaught exception (group=0xa614d908)
E/AndroidRuntime( 8529): FATAL EXCEPTION: AsyncTask #2
E/AndroidRuntime( 8529): java.lang.RuntimeException: An error occured while executing doInBackground()
E/AndroidRuntime( 8529): at android.os.AsyncTask$3.done(AsyncTask.java:299)
E/AndroidRuntime( 8529): at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:352)
E/AndroidRuntime( 8529): at java.util.concurrent.FutureTask.setException(FutureTask.java:219)
E/AndroidRuntime( 8529): at java.util.concurrent.FutureTask.run(FutureTask.java:239)
E/AndroidRuntime( 8529): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
E/AndroidRuntime( 8529): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
E/AndroidRuntime( 8529): at java.lang.Thread.run(Thread.java:856)
E/AndroidRuntime( 8529): Caused by: java.lang.NoClassDefFoundError: com.google.android.gms.maps.GoogleMapOptions
E/AndroidRuntime( 8529): at com.airbnb.android.react.maps.AirMapManager.<init>(AirMapManager.java:53)
E/AndroidRuntime( 8529): at com.airbnb.android.react.maps.MapsPackage.createViewManagers(MapsPackage.java:39)
E/AndroidRuntime( 8529): at com.facebook.react.XReactInstanceManagerImpl.createAllViewManagers(XReactInstanceManagerImpl.java:699)
E/AndroidRuntime( 8529): at com.facebook.react.CoreModulesPackage.createUIManager(CoreModulesPackage.java:204)
E/AndroidRuntime( 8529): at com.facebook.react.CoreModulesPackage.access$200(CoreModulesPackage.java:69)
E/AndroidRuntime( 8529): at com.facebook.react.CoreModulesPackage$8.get(CoreModulesPackage.java:143)
E/AndroidRuntime( 8529): at com.facebook.react.CoreModulesPackage$8.get(CoreModulesPackage.java:140)
E/AndroidRuntime( 8529): at com.facebook.react.LazyReactPackage.createNativeModules(LazyReactPackage.java:76)
E/AndroidRuntime( 8529): at com.facebook.react.XReactInstanceManagerImpl.processPackage(XReactInstanceManagerImpl.java:954)
E/AndroidRuntime( 8529): at com.facebook.react.XReactInstanceManagerImpl.createReactContext(XReactInstanceManagerImpl.java:862)
E/AndroidRuntime( 8529): at com.facebook.react.XReactInstanceManagerImpl.access$600(XReactInstanceManagerImpl.java:110)
E/AndroidRuntime( 8529): at com.facebook.react.XReactInstanceManagerImpl$ReactContextInitAsyncTask.doInBackground(XReactInstanceManagerImpl.ja
va:214)
E/AndroidRuntime( 8529): at com.facebook.react.XReactInstanceManagerImpl$ReactContextInitAsyncTask.doInBackground(XReactInstanceManagerImpl.ja
va:193)
E/AndroidRuntime( 8529): at android.os.AsyncTask$2.call(AsyncTask.java:287)
EDIT: I also create fork for testing https://github.com/pewh/react-native-maps and let’s see Example folder 😃
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 2
- Comments: 15 (3 by maintainers)
Commits related to this issue
- Update installation.md Add troubleshooting information for common error with Google Play services error https://github.com/airbnb/react-native-maps/issues/831#issuecomment-277703705 — committed to compojoom/react-native-maps by compojoom 7 years ago
- fixed crash when used with push notifications https://github.com/react-community/react-native-maps/issues/831 — committed to williangaspar/react-native-maps by williangaspar 6 years ago
I have the same issue with onesignal and react-native-maps. It runs on iOS perfectly.
Edit: Ok after some analyzing, it seems it’s a version mismatch of google play services between the two.
I edited node_modules/react-native-maps/android/build.gradle and changed the dependencies:
@MobiusHorizons in android/app/build.gradle try this:
and below this