React Native崩溃ClassNotFoundException

时间:2017-12-25 19:34:54

标签: android react-native

我使用React Native创建了一个应用程序并将其上传到Play商店,但是在Google Play控制台中报告的上个月发生了大约800次崩溃,我无法找到原因。

java.lang.RuntimeException: 
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2274)
at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2417)
at android.app.ActivityThread.access$800 (ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1342)
at android.os.Handler.dispatchMessage (Handler.java:110)
at android.os.Looper.loop (Looper.java:193)
at android.app.ActivityThread.main (ActivityThread.java:5322)
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)

Caused by: java.lang.ClassNotFoundException: 
at dalvik.system.BaseDexClassLoader.findClass (BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass (ClassLoader.java:497)
at java.lang.ClassLoader.loadClass (ClassLoader.java:457)
at android.app.Instrumentation.newActivity (Instrumentation.java:1061)
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2265)

如何找到解决问题的方法?

1 个答案:

答案 0 :(得分:0)

可能ProGuard剥离了一些课程。通常是支持类。试试这个:

-keep class android.support。** {*; }

-keep interface android.support。** {*; }