1.现象
项目使用RN,开启混淆后,启动App闪退。按RN官方给的混淆规则加上了,Application也不混淆依然闪退。
java.lang.RuntimeException: Unable to create application com.gaolu.qualityevaluate.application.QcEvaluateApplication: java.lang.RuntimeException: Requested enabled DevSupportManager, but DevSupportManagerImpl class was not found or could not be created
Caused by: java.lang.ClassNotFoundException: com.facebook.react.devsupport.DevSupportManagerImpl
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.facebook.react.devsupport.DevSupportManagerImpl" on path: DexPathList
Suppressed: java.lang.ClassNotFoundException: com.facebook.react.devsupport.DevSupportManagerImpl
看报错日志可以看到,是使用混淆后,无法找到com.facebook.react.devsupport.DevSupportManagerImpl类
当返回true但开启混淆,会启动闪退。
当返回true但关闭混淆,不会启动闪退。