在我的应用程序中,我扩展了应用程序类,它正在工作,但现在当我将它安装在另一部手机上时,我有棒棒糖,而崩溃的那个有奇巧这个错误出现:
-18 13:26:20.604 16622-16622/? D/dalvikvm﹕ open_cached_dex_file : /data/app/cu.otsenre.tacodependiente-1.apk /data/dalvik-cache/data@app@cu.otsenre.tacodependiente-1.apk@classes.dex
08-18 13:26:20.826 16622-16622/? W/System.err﹕ at org.acra.ACRA.init(ACRA.java:178)
08-18 13:26:20.826 16622-16622/? W/System.err﹕ at org.acra.ACRA.init(ACRA.java:136)
08-18 13:26:20.826 16622-16622/? W/System.err﹕ at org.acra.ACRA.init(ACRA.java:121)
08-18 13:26:20.826 16622-16622/? W/System.err﹕ at cu.otsenre.tacodependiente.utils.MySession.onCreate(MySession.java:46)
08-18 13:26:20.826 16622-16622/? W/System.err﹕ at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
08-18 13:26:20.826 16622-16622/? W/System.err﹕ at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4541)
08-18 13:26:20.826 16622-16622/? W/System.err﹕ at android.app.ActivityThread.access$1500(ActivityThread.java:151)
08-18 13:26:20.826 16622-16622/? W/System.err﹕ at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1381)
08-18 13:26:20.826 16622-16622/? W/System.err﹕ at android.os.Handler.dispatchMessage(Handler.java:110)
08-18 13:26:20.826 16622-16622/? W/System.err﹕ at android.os.Looper.loop(Looper.java:193)
08-18 13:26:20.827 16622-16622/? W/System.err﹕ at android.app.ActivityThread.main(ActivityThread.java:5299)
08-18 13:26:20.827 16622-16622/? W/System.err﹕ at java.lang.reflect.Method.invokeNative(Native Method)
08-18 13:26:20.827 16622-16622/? W/System.err﹕ at java.lang.reflect.Method.invoke(Method.java:515)
08-18 13:26:20.827 16622-16622/? W/System.err﹕ at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:829)
08-18 13:26:20.827 16622-16622/? W/System.err﹕ at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:645)
08-18 13:26:20.827 16622-16622/? W/System.err﹕ at dalvik.system.NativeStart.main(Native Method)
08-18 13:26:20.827 16622-16622/? W/dalvikvm﹕ threadid=1: calling UncaughtExceptionHandler
08-18 13:26:20.828 16622-16622/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: cu.otsenre.tacodependiente, PID: 16622
java.lang.NoClassDefFoundError: org.acra.ErrorReporter$1
at org.acra.ErrorReporter.<clinit>(ErrorReporter.java:110)
at org.acra.ACRA.init(ACRA.java:178)
at org.acra.ACRA.init(ACRA.java:136)
at org.acra.ACRA.init(ACRA.java:121)
at cu.otsenre.tacodependiente.utils.MySession.onCreate(MySession.java:46)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4541)
at android.app.ActivityThread.access$1500(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1381)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:5299)
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:829)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:645)
at dalvik.system.NativeStart.main(Native Method)
08-18 13:26:20.884 16622-16622/? I/Process﹕ Sending signal. PID: 16622 SIG: 9
谁能帮帮我,我已经重新安装了android studio。清洁项目。不知道还能做什么
当我得到NoClassDefFoundError
s时,我所做的最常见的错误是我的proguard配置混淆了类名。
请参阅本页了解更多信息:https://github.com/ACRA/acra/wiki/ProGuard特别是:
# Keep all the ACRA classes
-keep class org.acra.** { *; }
感谢您的所有输入,经过朋友的帮助,我发现问题是我在应用程序构建中遇到的。gradle指令MultiDexEnable= true
导致我的应用程序在棒棒糖中工作良好,但在奇巧中给出了错误。我把它取了下来,就像施了魔法一样。老实说,我甚至不知道那个指令是什么意思,但现在我的客户可以使用我的应用程序了。谢谢你的帮助