来源不明奇怪的空指针 [英] Strange NullPointer from unknown source
问题描述
我有,当我启动我的应用程序,来了一个非常令人沮丧的空指针。它没有启动,直到我更新的Android Studio和谷歌播放服务。我使用LocationClient使用GoogleApiClient切换。然后,我的应用程序意外崩溃突然冒出来,当我尝试启动它。我一直在试图解决这一问题的一个星期左右,我无法推测这一问题的根源。这是日志时崩溃发生
流程:com.android.wallfly,PID:3941
显示java.lang.NullPointerException
在com.google.android.gms.internal.nj $ a.handleMessage(来源不明)
在android.os.Handler.dispatchMessage(Handler.java:102)
在android.os.Looper.loop(Looper.java:157)
在android.app.ActivityThread.main(ActivityThread.java:5356)
在java.lang.reflect.Method.invokeNative(本机方法)
在java.lang.reflect.Method.invoke(Method.java:515)
在com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:1265)
在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
在dalvik.system.NativeStart.main(本机方法)
有可能有很多的原因,应用程序崩溃,并得到一个空指针,如果你非常肯定它不是code可能是你能尝试安装/升级谷歌播放服务从SDK管理器的最新版本。 GoogleApClient是整个API提供的钩子的请确保您有最新版本的谷歌Play的服务,还可以选择应用(手机,耐磨等)的种类和重新导入谷歌播放服务,并在您的应用程序添加为库。
希望这将帮助!
I have a very frustrating null pointer that comes up when I launch my application. It did not start until I updated Android Studio and Google Play Services. I switched from using LocationClient to using GoogleApiClient. Then my app crashes unexpectedly out of nowhere when I try to launch it. I have been trying to fix this for about a week and I cannot guess where this problem is coming from. This is the log when the crash happens
Process: com.android.wallfly, PID: 3941
java.lang.NullPointerException
at com.google.android.gms.internal.nj$a.handleMessage(Unknown Source)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:157)
at android.app.ActivityThread.main(ActivityThread.java:5356)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
at dalvik.system.NativeStart.main(Native Method)
There may be a lot of reasons for the app crash and getting a Null pointer, If you are very sure its not the code may be you can try to install/upgrade the Google Play Services to the latest version from SDK manager. GoogleApClient is the hook provided throughout the API's make sure you have latest version of the Google Play Services and also select the type of app (mobile, wearable etc) and reimport Google Play Services and add as a Lib in your app. Hope this would help!!
这篇关于来源不明奇怪的空指针的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!