question

lockwoodpub avatar image
lockwoodpub asked

Unity - FATAL EXCEPTION - java.lang.NoClassDefFoundError

Hi Guys, This issue only seems to affect the older tablets, currently stops the application running on a Amazon Kindle Fire HD X43Z60. I've updated to the latest version of GameCircle for Unity (Amazon GameCircle Unity Plugin Version 2.5.2) but the issue still happens. FATAL EXCEPTION: main java.lang.Error: FATAL EXCEPTION [main] Unity version : 4.3.4f1 Device model : Amazon KFTT Device fingerprint: Android/tate/tate:4.0.3/IML74K/7.5.1_user_5170020:user/release-keys Caused by: java.lang.NoClassDefFoundError: android/os/AsyncTask at android.webkit.WebView.setupPackageListener(WebView.java:1254) at android.webkit.WebView. (WebView.java:1125) at android.webkit.WebView. (WebView.java:1086) at android.webkit.WebView. (WebView.java:1075) at android.webkit.WebView. (WebView.java:1065) at android.webkit.WebView. (WebView.java:1056) at com.amazon.ags.html5.util.WebViewFactory.newWebView(WebViewFactory.java:50) at com.amazon.ags.html5.util.WebViewFactory. (WebViewFactory.java:27) at com.amazon.ags.html5.factory.ServiceFactory. (ServiceFactory.java:247) at com.amazon.ags.html5.factory.ServiceFactory.initialize(ServiceFactory.java:163) at com.amazon.ags.api.AmazonGamesClient$1$1$1.run(AmazonGamesClient.java:209) 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:4558) 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:784) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) at dalvik.system.NativeStart.main(Native Method) Has anyone else experienced this issue? Any help appreciated, Cheers.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

lockwoodpub avatar image
lockwoodpub answered
Also, I tried building and running the game with Amazon Game Circle disabled and this issue didn't occur.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

justin avatar image
justin answered
Hi lockwoodpub, Are you using a custom manifest for this? There is a sample manifest in the Android directory that may help with this problem, as this can be due to packages/Jars missing from the build process. You might want to try re-importing your GameCircle package from the Asset Store as well, and make note of any green files added to the projects-- sometimes files get moved without notice and cause everything to break.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

viktor-r avatar image
viktor-r answered
I'm facing the same issue on Kindle Fire HD 7" (KFTT, API level 15), but not on Fire HD 6 (KFARWI, API level 19). Have you found any solution?
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

viktor-r avatar image
viktor-r answered
F5
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Levon@Amazon avatar image
Levon@Amazon answered
Hi viktor-r, Apologies for the delay in replying. This seems to be a bug in Android OS. Many people are seeing it at random times, even regardless of GameCircle integration, e.g.: http://stackoverflow.com/questions/27121376/android-noclassdeffounderror-android-os-asynctask The workaround seems to be to load that class explicitly in Application.onCreate(): [code] try { Class.forName("android.os.AsyncTask"); } catch(Throwable ignore) { // ignored } [/code] Please give it a try and see if it works for you. Let us know if you have any further questions. Thanks!
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.