react-native-maps: App crashing on sony experia with android 6

I’m getting this error (only on a sony experia):

java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Configuration android.content.res.Resources.getConfiguration()' on a null object reference
                                                             at android.util.ResolutionOverride.<init>(ResolutionOverride.java:56)
                                                             at android.view.SurfaceView.init(SurfaceView.java:207)
                                                             at android.view.SurfaceView.<init>(SurfaceView.java:187)
                                                             at maps.X.x.<init>(Unknown Source)
                                                             at maps.X.v.<init>(Unknown Source)
                                                             at maps.E.u.<init>(Unknown Source)
                                                             at maps.E.u.a(Unknown Source)
                                                             at maps.ag.ad.a(Unknown Source)
                                                             at maps.ag.t.a(Unknown Source)
                                                             at maps.ag.Q.a(Unknown Source)
                                                             at vn.onTransact(:com.google.android.gms.DynamiteModulesB:66)
                                                             at android.os.Binder.transact(Binder.java:387)
                                                             at com.google.android.gms.maps.internal.IMapViewDelegate$zza$zza.onCreate(Unknown Source)
                                                             at com.google.android.gms.maps.MapView$zza.onCreate(Unknown Source)
                                                             at com.google.android.gms.dynamic.zza$3.zzb(Unknown Source)
                                                             at com.google.android.gms.dynamic.zza$1.zza(Unknown Source)
                                                             at com.google.android.gms.maps.MapView$zzb.zzzW(Unknown Source)
                                                             at com.google.android.gms.maps.MapView$zzb.zza(Unknown Source)
                                                             at com.google.android.gms.dynamic.zza.zza(Unknown Source)
                                                             at com.google.android.gms.dynamic.zza.onCreate(Unknown Source)
                                                             at com.google.android.gms.maps.MapView.onCreate(Unknown Source)
                                                             at com.AirMaps.AirMapView.<init>(AirMapView.java:71)
                                                             at com.AirMaps.AirMapManager.createViewInstance(AirMapManager.java:70)
                                                             at com.AirMaps.AirMapManager.createViewInstance(AirMapManager.java:27)
                                                             at com.facebook.react.uimanager.ViewManager.createView(ViewManager.java:44)

As are a few other people:

https://code.google.com/p/gmaps-api-issues/issues/detail?id=9071

and: https://github.com/lelandrichardson/react-native-maps/issues/165

Does anyone know of a solution?

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 20

Most upvoted comments

Any idea when there will be a release containing the fix?

I’ve pushed another change to use the activity context in the AirMapView.

Have also just got a Z5 Compact here and can confirm it now works without crashing.

Can you update your package.json to this and confirm if it works for you? “git://github.com/locly/react-native-maps.git#6d393fb6796deb4f8620533cee5c90cb8051d48f”

This fix is based on the 0.4-stable branch rather than 0.5, which introduced the change of name - yet to update the 0.5 version.