android – java.lang.NullPointerException at GoogleApiActivity

前端之家收集整理的这篇文章主要介绍了android – java.lang.NullPointerException at GoogleApiActivity前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在使用Crashlytics为我的 Android应用程序,我有很多事件在ActivityThread.java:android.app.ActivityThread.deliverResults

我在这里放了一些堆栈跟踪:

Fatal Exception: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null,request=1,result=0,data=null} to activity {me.robano.android/com.google.android.gms.common.api.GoogleApiActivity}: java.lang.NullPointerException
       at android.app.ActivityThread.deliverResults(ActivityThread.java:3641)
       at android.app.ActivityThread.handleSendResult(ActivityThread.java:3684)
       at android.app.ActivityThread.access$1300(ActivityThread.java:166)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1331)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:136)
       at android.app.ActivityThread.main(ActivityThread.java:5584)
       at java.lang.reflect.Method.invokeNative(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:515)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
       at dalvik.system.NativeStart.main(NativeStart.java)
Caused by java.lang.NullPointerException
       at com.google.android.gms.common.api.GoogleApiActivity.zza(Unknown Source)
       at com.google.android.gms.common.api.GoogleApiActivity.onActivityResult(Unknown Source)
       at android.app.Activity.dispatchActivityResult(Activity.java:5634)
       at android.app.ActivityThread.deliverResults(ActivityThread.java:3637)
       at android.app.ActivityThread.handleSendResult(ActivityThread.java:3684)
       at android.app.ActivityThread.access$1300(ActivityThread.java:166)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1331)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:136)
       at android.app.ActivityThread.main(ActivityThread.java:5584)
       at java.lang.reflect.Method.invokeNative(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:515)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
       at dalvik.system.NativeStart.main(NativeStart.java)

我也在我的应用程序中使用Google firebase.

请帮忙!
谢谢

解决方法

这个问题绝对是新的Google服务(9.0.0到9.4.0).它尝试启动返回null到anActivityResult的东西.

可能是解决这个问题的唯一方法

PackageManager pm = getPackageManager();
pm.setComponentEnabledSetting(new ComponentName(this,GoogleApiActivity.class),PackageManager.COMPONENT_ENABLED_STATE_DISABLED,PackageManager.DONT_KILL_APP);
原文链接:https://www.f2er.com/android/312500.html

猜你在找的Android相关文章