Hi everyone,
Well, i know that there’s another post with this problem, but, i didin’t find the solution and i have more clues of the problem.
I have my Android App, that i’m testing with two devices: a Nexus 7 (2013) with Marshmallow 6.0.1 and a Blu Advance 4.0 with JellyBean 4.2.2
Some clues that i’ve found:
- This error (java.lang.NoClassDefFoundError: weborb.types.Types) is only in the Blu device. It works like a charm in the Nexus 7.
It's appears ONLY when i launch an activity of the app that's not the Main Activity, for example, a notification that have an intent to launch a secondary activity, or an UncaughtExceptionHandler with launch an activity that can send a report (.txt) to the Backendless servers. If the aplication runs from the MainActivity, works well.
java.lang.NoClassDefFoundError: weborb.types.Types
at com.backendless.UserService.<init>(UserService.java:56)
at com.backendless.UserService.<clinit>(UserService.java:47)
at com.backendless.Backendless.<clinit>(Backendless.java:44)
at com.sdevelop.taxionline.MostrarError.enviarErrorAlServidor(MostrarError.java:64)
at com.sdevelop.taxionline.MostrarError.access$100(MostrarError.java:30)
at com.sdevelop.taxionline.MostrarError$2.onClick(MostrarError.java:57)
at android.view.View.performClick(View.java:4212)
at android.view.View$PerformClick.run(View.java:17476)
at android.os.Handler.handleCallback(Handler.java:800)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5371)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
at dalvik.system.NativeStart.main(Native Method)
The error points always at the first line where there’s an instance of Backendless.
Things that i’ve tried:
- javaMaxHeapSize "4g"
Update Android Studio to V2.0 and gradle to 2.0.0
Add -dontwarn -keep class weborb.** {*;} -keep class com.backendless.** {*;} in the proguard-rules.pro
PENDING: Throw the device from the windows.
EDIT: I try the app with another device (Sony Xperia E Android 4.1.1) and throws me a similar error:
java.lang.ExceptionInInitializerError
at com.sdevelop.taxionline.MostrarError.enviarErrorAlServidor(MostrarError.java:62)
at com.sdevelop.taxionline.MostrarError.access$100(MostrarError.java:30)
at com.sdevelop.taxionline.MostrarError$2.onClick(MostrarError.java:55)
at android.view.View.performClick(View.java:4106)
at android.view.View$PerformClick.run(View.java:17150)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4793)
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:808)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:575)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ExceptionInInitializerError
at com.backendless.Backendless.<clinit>(Backendless.java:44)
... 14 more
Caused by: java.lang.NoClassDefFoundError: weborb.types.Types
at com.backendless.UserService.<init>(UserService.java:56)
at com.backendless.UserService.<clinit>(UserService.java:47)
... 15 more
java.lang.ExceptionInInitializerError
************ INFORMACION DEL DISPOSITIVO ***********
Brand: Sony
Device: C1504
Model: C1504
Product: C1504_1275-6551
************ FIRMWARE ************
SDK: 16
Release: 4.1.1