Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
164 views
in Technique[技术] by (71.8m points)

android - NullPointerException from Google maps

I've just recently started to receive a nullpointerexception from Android google maps and I can't figure out what causes it. Currently it has only been reported on a HTC Desire 500 (z4u) device running android 4.1. Any suggestions or ideas would be greatly appreciated.

Edit:

So I've gotten my hands on a device that gives the error (HTC Desire, Android 4.1.2, HTC SDK API 5.26). As I suspected from trace it is purely internal error. Following didn't help:

  • Rebooting
  • reinstall
  • Newest version of google play services
  • Update app to use play services 8.3.0

The stack trace is seen bellow:

java.lang.RuntimeException: Unable to resume activity {dk.mobikom.android/dk.mobikom.android.activities.ContactDetailActivity}: java.lang.NullPointerException
    at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3036)
    at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3077)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2373)
    at android.app.ActivityThread.access$600(ActivityThread.java:151)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1330)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:155)
    at android.app.ActivityThread.main(ActivityThread.java:5536)
    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:1074)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:841)
    at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
    at com.google.maps.api.android.lib6.gmm6.m.ad.a(Unknown Source)
    at com.google.maps.api.android.lib6.gmm6.c.h.a(Unknown Source)
    at com.google.maps.api.android.lib6.gmm6.c.y.a(Unknown Source)
    at com.google.maps.api.android.lib6.e.bd.a(Unknown Source)
    at com.google.maps.api.android.lib6.e.ev.a(Unknown Source)
    at com.google.maps.api.android.lib6.e.z.a(Unknown Source)
    at com.google.maps.api.android.lib6.e.y.a(Unknown Source)
    at com.google.android.gms.maps.internal.u.onTransact(SourceFile:107)
    at android.os.Binder.transact(Binder.java:326)
    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:1026)
    at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1207)
    at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:738)
    at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1572)
    at android.support.v4.app.Fragment.performResume(Fragment.java:2012)
    at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067)
    at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1207)
    at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1189)
    at android.support.v4.app.FragmentManagerImpl.dispatchResume(FragmentManager.java:2011)
    at android.support.v4.app.FragmentController.dispatchResume(FragmentController.java:187)
    at android.support.v4.app.FragmentActivity.onResumeFragments(FragmentActivity.java:426)
    at android.support.v4.app.FragmentActivity.onPostResume(FragmentActivity.java:415)
    at android.support.v7.app.AppCompatActivity.onPostResume(AppCompatActivity.java:141)
    at android.app.Activity.performResume(Activity.java:5161)
    at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3019)
    ... 12 more
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

So as suspected this is an issue at googles side. They've verified the bug and are working on a fix (2015-12-21), see googles bug tracker for up to date info about the issue.

Edit:

So I got to test Georges SD info and yes inserting a SD card solved the problem. So from this we can conclude phones that don't have an internal fake-external storage (like most phones now a days) will crash from this bug... So this might be a workaround for those who work in the enterprise segment but for those working in the consumer segment this will not really help a lot...

Edit Jan 20, 2016

A developer from the Google team has announced the fix has been made and it will be rolled out with the next major release of Google play, but they haven't set a timeline for that yet.

Edit Jun 02, 2016

A developer from the Google team has announced it is confirmed fixed:

Sorry this took so long to fix, but here is the bug fix you've been waiting for!

We can confirm that this issue is now fixed in version 9.0.83 of Google Play Services, released in May 2016.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...