I've recently published a couple android games based in libgdx, both of them have reported an error I have no idea where to begin with debugging. This is the stacktrace.-
java.lang.NullPointerException: null result when primitive expected
at $Proxy0.equals(Native Method)
at com.google.android.gms.internal.dw$g.equals(Unknown Source)
at java.util.ArrayList.contains(ArrayList.java:342)
at com.google.android.gms.internal.dx.a(Unknown Source)
at com.google.android.gms.internal.dw$h.b(Unknown Source)
at com.google.android.gms.internal.dw$h.b(Unknown Source)
at com.google.android.gms.internal.dw$b.bR(Unknown Source)
at com.google.android.gms.internal.dw$a.handleMessage(Unknown Source)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3687)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
at dalvik.system.NativeStart.main(Native Method)
I know the problem is something related with Google Play Game Services, but can't figure out what can be causing it. In both cases, the android version seems to be 2.3.3. Anyone who faced the same issue?
Try going on properties on your android project , and under the android tag check to see if your google library is there . If it is there try removing it and add it again .
This is how i solved this problem and worked for me . (i still get this error sometimes when i start the eclipse ). Good luck !
Related
My android app is more than a year on Play now and everything was OK.
About 2 weeks ago users started complaining on crashes. Than was strange cause I haven't changed anything for some time now.
Yesterday, after finally taking a look on crash logs, I've noticed huge number NoClassDefFoundError being thrown, which led to crashes in the app.
3 strange things:
1) GameplayFragment$TimerUpdater is of course present.
1) The app has not been updated for months.
2) Apparently only GINGERBREAD versions crash
Has anybody experienced this?
Thanks
[main] java.lang.NoClassDefFoundError: com.ivygames.morskoiboi.ui.GameplayFragment$TimerUpdater at
com.ivygames.morskoiboi.ui.GameplayFragment.startTimer(GameplayFragment.java:336) at
com.ivygames.morskoiboi.ui.GameplayFragment.access$10(GameplayFragment.java:333) at
com.ivygames.morskoiboi.ui.GameplayFragment$UiProxy$1.run(GameplayFragment.java:495) at
android.os.Handler.handleCallback(Handler.java:587) at
android.os.Handler.dispatchMessage(Handler.java:92) at
android.os.Looper.loop(Looper.java:130) at
android.app.ActivityThread.main(ActivityThread.java:3691) at
java.lang.reflect.Method.invokeNative(Native Method) at
java.lang.reflect.Method.invoke(Method.java:507) at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912) at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:670) at
dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.ClassNotFoundException: com.ivygames.morskoiboi.ui.GameplayFragment$TimerUpdater in loader dalvik.system.PathClassLoader[/data/app/com.ivygames.morskoiboi-1.apk] at
dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240) at
java.lang.ClassLoader.loadClass(ClassLoader.java:551) at
java.lang.ClassLoader.loadClass(ClassLoader.java:511) ... 12 more (BOARD=codina; BOOTLOADER=unknown; BRAND=samsung; CPU_ABI=armeabi-v7a; DEVICE=GT-I8160; DISPLAY=GINGERBREAD.XXLL2; HARDWARE=samsung; HOST=DELL205; ID=GINGERBREAD; MANUFACTURER=samsung; MODEL=GT-I8160; PRODUCT=GT-I8160; USER=dpi; SDK=10)
Please see minimum sdk version required you can set it to lower android version i.e 7 or 8
I received this error twice in the last three days on different devices. I do not use WebView at all in my app so I am a bit confused.
The only thing I can think of is AdMob but wouldn't that show up in the stack trace?
Here is the stack trace:
java.lang.NullPointerException at
android.webkit.WebView.stopLoading(WebView.java:1842) at
c$a.run(Unknown Source) at
android.os.Handler.handleCallback(Handler.java:587) at
android.os.Handler.dispatchMessage(Handler.java:92) at
android.os.Looper.loop(Looper.java:143) at
android.app.ActivityThread.main(ActivityThread.java:4914) at
java.lang.reflect.Method.invokeNative(Native Method) at
java.lang.reflect.Method.invoke(Method.java:521) at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) at
dalvik.system.NativeStart.main(Native Method)
Update: In addition to the link Arhimed provided here is a link where an AdMob rep is discussing this as well
https://groups.google.com/forum/#!topic/google-admob-ads-sdk/H3lkDEmburw
From what you said I am pretty sure this is an AdMob issue. The reason you don't see any "AdMob" occurrencies in the log is that AdMob comes as an obfuscated library jar. So c$a.run(Unknown Source) is a log enrty produced by an obfuscated code.
UPDATE:
This IS really related to AdMob. There is a related SO question: Android uncatchable NullPointerException
I've been getting the following error, reported via Market developer console by the users of my app:
java.lang.RuntimeException: Failed to register input channel. Check logs for details.
at android.view.InputQueue.nativeRegisterInputChannel(Native Method)
at android.view.InputQueue.registerInputChannel(InputQueue.java:92)
at android.view.ViewRoot.setView(ViewRoot.java:568)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:177)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
at android.view.Window$LocalWindowManager.addView(Window.java:465)
at android.app.Dialog.show(Dialog.java:241)
at my.program.MyActivity.handleFailure(Unknown Source)
at my.program.MyActivity$RunFailed.run(Unknown Source)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3835)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:847)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:605)
at dalvik.system.NativeStart.main(Native Method)
Italicized lines are part of my code. The code in question just creates and shows a dialog. It is run from a Runnable posted to a Handler. Everything should be happening in the GUI thread (that's why Handler is used).
I don't know how to debug this. I haven't experienced this problem myself, and all I have is just a bunch of automated reports. Google shows up a couple of threads on this exact problem, but no answers (except a hint of this being an Android 2.3.3-specific problem).
This may be a Launcher Pro issue. LP is a home replacement. It appears Launcher Pro does not release some resources as it should. Check out this answer here
Does anyone know what this could possibly mean? Apparently someone else's app caused mine to crash? And it happens to be an app that directly competes with mine:
java.lang.RuntimeException: Unable to create BackupAgent com.MY_COMPEITOR'S_APP.backup.BackupAgent: java.lang.NullPointerException
at android.app.ActivityThread.handleCreateBackupAgent(ActivityThread.java:2905)
at android.app.ActivityThread.access$4000(ActivityThread.java:125)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2128)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at android.app.ActivityThread$PackageInfo.initializeJavaContextClassLoader(ActivityThread.java:529)
at android.app.ActivityThread$PackageInfo.getClassLoader(ActivityThread.java:474)
at android.app.ActivityThread.handleCreateBackupAgent(ActivityThread.java:2873)
... 10 more
TenFour I would bet since you are talking about a competing App that there must be some INtent Handling going on that led to this. Maybe the Competitor app was actually trying to do something at the same time your app was trying to do something and they clashed. Without knowing more it's hard to provide a more detailed answer
One of my Android users is getting a force-close when launching Google Map (MapActivity class) inside my application. He gets a MissingResourceException. He's the only one complaining so far, and he is using Vanilla Tazz phone. The Google maps application itself works well on his device. It looks like it's something specific to Vanilla Tazz. I tried to find a fix online but have not been successful. Here's the Android error log:
java.lang.ExceptionInInitializerError
at ...
at android.view.View.performClick(View.java:2449)
at android.view.View$PerformClick.run(View.java:9027)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ExceptionInInitializerError
at com.google.android.maps.MapActivity.<clinit>(MapActivity.java:295)
... 14 more
Caused by: java.util.MissingResourceException: Could not find required resource
com.android.internal.R$drawable.loading_tile_android (java.lang.NoSuchFieldException: loading_tile_android)
at com.google.android.maps.InternalR.getField(InternalR.java:65)
at com.google.android.maps.InternalR.get(InternalR.java:39)
at com.google.android.maps.InternalR.access$000(InternalR.java:28)
at com.google.android.maps.InternalR$drawable.get(InternalR.java:112)
at com.google.android.maps.InternalR$drawable.<clinit>(InternalR.java:119)
... 15 more
I would appreciate if anyone can suggest anything to fix this.
Not sure you'll find a fix for this: it sounds like the ROM was built without that resource as part of the OS image. They'll probably need a new ROM to get around that.