react-native-maps: Android crash when using 0.7.1 with React Native 0.32

Upon attempting to load any instance of a MapView, the map component is visible (but not filled-in) for a few seconds, but then the app crashes with the following stack trace:

08-25 11:54:58.281 893-893/com.lmt E/CMTUncaughtExceptionHandler: Thread name = main ex.message = No direct method <init>(IJ)V in class Lcom/facebook/react/uimanager/events/Event; or its super classes (declaration of 'com.facebook.react.uimanager.events.Event' appears in /data/app/com.lmt-2/base.apk) stack =java.lang.NoSuchMethodError: No direct method <init>(IJ)V in class Lcom/facebook/react/uimanager/events/Event; or its super classes (declaration of 'com.facebook.react.uimanager.events.Event' appears in /data/app/com.lmt-2/base.apk)
                                                                      at com.airbnb.android.react.maps.RegionChangeEvent.<init>(RegionChangeEvent.java:16)
                                                                      at com.airbnb.android.react.maps.AirMapView$8.onCameraChange(AirMapView.java:220)
                                                                      at com.google.android.gms.maps.GoogleMap$12.onCameraChange(Unknown Source)
                                                                      at com.google.android.gms.maps.internal.zze$zza.onTransact(Unknown Source)
                                                                      at android.os.Binder.transact(Binder.java:499)
                                                                      at wg.a(:com.google.android.gms.DynamiteModulesB:93)
                                                                      at maps.D.a.a(Unknown Source)
                                                                      at maps.D.a$1.run(Unknown Source)
                                                                    at android.os.Handler.handleCallba

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 6
  • Comments: 15 (4 by maintainers)

Most upvoted comments

@rgurzhiy @alexHlebnikov I solved the 0.32/Android problems in my pull request, check it out: #502

If you change your package.json to what I have in that PR and npm install, both the Android and iOS problems you describe will be fixed because it will pull the project from Github instead of NPM (the iOS problem is already fixed in the master branch).

Hopefully the repo owners will merge the PR and then do a new release to NPM.

If you need to force a newer version of Google Play Services, my resolutionStrategy block above in your android/build.gradle file should do the trick. I believe the project specifies 8.4.0 to maintain compatibility with older devices and Android versions.

@alexHlebnikov Thks for pointing that out. I’ll try to fix it.

UPD: done