当前位置: 动力学知识库 > 问答 > 编程问答 >

android: The google maps 8.4.0 version is crashing for some devices

问题描述:

We're facing an issue with the maps is some phones. Here's the open issue in the google repo. None of the comments on the issue is helpful.

We are using 8.4.0 version and we have no clue how to fix or catch this crash.

This is hapening only in some devices example : LGE LG-P970 Android 4.0.4 API 15.

We're using the SupportMapFragment.

The stack trace is not giving any details:

E/AndroidRuntime: FATAL EXCEPTION: main

java.lang.NullPointerException

at maps.dz.o.a(Unknown Source)

at maps.dg.e.a(Unknown Source)

at maps.dg.u.a(Unknown Source)

at maps.ei.ag.a(Unknown Source)

at maps.ei.bu.a(Unknown Source)

at maps.ei.n$1.a(Unknown Source)

at maps.ei.n.a(Unknown Source)

at com.google.android.gms.maps.internal.i$a.onTransact(:com.google.android.gms.alldynamite:107)

at android.os.Binder.transact(Binder.java:297)

at com.google.android.gms.maps.internal.IMapFragmentDelegate$zza$zza.onCreateView(Unknown Source)

at com.google.android.gms.maps.SupportMapFragment$zza.onCreateView(Unknown Source)

at com.google.android.gms.dynamic.zza$4.zzb(Unknown Source)

at com.google.android.gms.dynamic.zza.zza(Unknown Source)

at com.google.android.gms.dynamic.zza.onCreateView(Unknown Source)

at com.google.android.gms.maps.SupportMapFragment.onCreateView(Unknown Source)

at android.support.v4.app.Fragment.performCreateView(Fragment.java:1974)

at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067)

at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1252)

at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:738)

at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1617)

at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:517)

at android.os.Handler.handleCallback(Handler.java:605)

at android.os.Handler.dispatchMessage(Handler.java:92)

at android.os.Looper.loop(Looper.java:137)

at android.app.ActivityThread.main(ActivityThread.java:4516)

at java.lang.reflect.Method.invokeNative(Native Method)

at java.lang.reflect.Method.invoke(Method.java:511)

at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)

at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)

at dalvik.system.NativeStart.main(Native Method)

Did anybody face this issue? any fix (or work around) is welcome.

Thanks!

网友答案:

I observe this crash in activity which dynamically changes fragments when Android device connected to computer in USB debug mode. Without USB connection application works fine.

Stack trace is not very helpful:

java.lang.RuntimeException: Unable to start activity ComponentInfo{xxx}: java.lang.NullPointerException
   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2338)
   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2388)
   at android.app.ActivityThread.access$900(ActivityThread.java:148)
   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1319)
   at android.os.Handler.dispatchMessage(Handler.java:99)
   at android.os.Looper.loop(Looper.java:137)
   at android.app.ActivityThread.main(ActivityThread.java:5473)
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:525)
   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:806)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622)
   at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
   at maps.dz.o.a(Unknown Source)
   at maps.dg.e.a(Unknown Source)
   at maps.dg.p.a(Unknown Source)
   at maps.ei.ag.a(Unknown Source)
   at maps.ei.bu.a(Unknown Source)
   at maps.ei.n$1.a(Unknown Source)
   at maps.ei.n.a(Unknown Source)
   at com.google.android.gms.maps.internal.i$a.onTransact(:com.google.android.gms.alldynamite:107)
   at android.os.Binder.transact(Binder.java:347)
   at com.google.android.gms.maps.internal.IMapFragmentDelegate$zza$zza.onCreateView(Unknown Source)
   at com.google.android.gms.maps.SupportMapFragment$zza.onCreateView(Unknown Source)
   at com.google.android.gms.dynamic.zza$4.zzb(Unknown Source)
   at com.google.android.gms.dynamic.zza.zza(Unknown Source)
   at com.google.android.gms.dynamic.zza.onCreateView(Unknown Source)
   at com.google.android.gms.maps.SupportMapFragment.onCreateView(Unknown Source)
   at android.support.v4.app.Fragment.performCreateView(Fragment.java:1962)
   at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067)
   at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1248)
   at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:738)
   at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1613)
   at android.support.v4.app.FragmentController.execPendingActions(FragmentController.java:330)
   at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:547)
   at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1171)
   at android.app.Activity.performStart(Activity.java:5244)
   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2311)
   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2388) 
   at android.app.ActivityThread.access$900(ActivityThread.java:148) 
   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1319) 
   at android.os.Handler.dispatchMessage(Handler.java:99) 
   at android.os.Looper.loop(Looper.java:137) 
   at android.app.ActivityThread.main(ActivityThread.java:5473) 
   at java.lang.reflect.Method.invokeNative(Native Method) 
   at java.lang.reflect.Method.invoke(Method.java:525) 
   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:806) 
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622) 
   at dalvik.system.NativeStart.main(Native Method) 

Device: Huawei G535-L11, Android 4.3

Workaround: disconnect device from USB before launching the app

分享给朋友:
您可能感兴趣的文章:
随机阅读: