Open 670832188 opened 4 years ago
应用补丁后:出现java.lang.ClassNotFoundException: Didn't find class "com.cy.hotfix.test.aPatch"异常;实际上补丁包中生成的补丁类是“com.cy.hotfix.test.AddClassTestPatch”,
异常类型:app运行时异常
手机型号:全部
手机系统版本:Android Q
Robust版本:0.4.99
Gradle版本:3.5.3
系统:如:Windows
堆栈/日志:
ava.lang.NoClassDefFoundError: Failed resolution of: Lcom/cy/hotfix/test/aPatch; 2020-07-07 11:48:55.025 22337-22337/com.cy.hotfix.test.robust W/System.err: at com.cy.hotfix.test.AddClassTestPatch.(Unknown Source:5) 2020-07-07 11:48:55.025 22337-22337/com.cy.hotfix.test.robust W/System.err: at com.cy.hotfix.test.AddClassTestPatchControl.accessDispatch(Unknown Source:38) 2020-07-07 11:48:55.025 22337-22337/com.cy.hotfix.test.robust W/System.err: at com.meituan.robust.PatchProxy.accessDispatch(PatchProxy.java:94) 2020-07-07 11:48:55.025 22337-22337/com.cy.hotfix.test.robust W/System.err: at com.meituan.robust.PatchProxy.proxy(PatchProxy.java:44) 2020-07-07 11:48:55.025 22337-22337/com.cy.hotfix.test.robust W/System.err: at com.cy.hotfix.test.a.a(Unknown Source:19) 2020-07-07 11:48:55.025 22337-22337/com.cy.hotfix.test.robust W/System.err: at com.cy.hotfix.test.activity.RobustTestActivity.q(RobustTestActivity.java:47) 2020-07-07 11:48:55.025 22337-22337/com.cy.hotfix.test.robust W/System.err: at com.cy.hotfix.test.activity.RobustTestActivity.onClick(RobustTestActivity.java:31) 2020-07-07 11:48:55.025 22337-22337/com.cy.hotfix.test.robust W/System.err: at android.view.View.performClick(View.java:7247) 2020-07-07 11:48:55.025 22337-22337/com.cy.hotfix.test.robust W/System.err: at android.view.View.performClickInternal(View.java:7224) 2020-07-07 11:48:55.025 22337-22337/com.cy.hotfix.test.robust W/System.err: at android.view.View.access$3500(View.java:819) 2020-07-07 11:48:55.025 22337-22337/com.cy.hotfix.test.robust W/System.err: at android.view.View$PerformClick.run(View.java:27551) 2020-07-07 11:48:55.025 22337-22337/com.cy.hotfix.test.robust W/System.err: at android.os.Handler.handleCallback(Handler.java:914) 2020-07-07 11:48:55.025 22337-22337/com.cy.hotfix.test.robust W/System.err: at android.os.Handler.dispatchMessage(Handler.java:100) 2020-07-07 11:48:55.025 22337-22337/com.cy.hotfix.test.robust W/System.err: at android.os.Looper.loop(Looper.java:225) 2020-07-07 11:48:55.025 22337-22337/com.cy.hotfix.test.robust W/System.err: at android.app.ActivityThread.main(ActivityThread.java:7594) 2020-07-07 11:48:55.025 22337-22337/com.cy.hotfix.test.robust W/System.err: at java.lang.reflect.Method.invoke(Native Method) 2020-07-07 11:48:55.025 22337-22337/com.cy.hotfix.test.robust W/System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539) 2020-07-07 11:48:55.025 22337-22337/com.cy.hotfix.test.robust W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950) 2020-07-07 11:48:55.026 22337-22337/com.cy.hotfix.test.robust W/System.err: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.cy.hotfix.test.aPatch" on path: DexPathList[[zip file "/data/user/0/com.cy.hotfix.test.robust/cache/patches/patch_temp.jar"],nativeLibraryDirectories=[/system/lib64, /system/product/lib64]] 2020-07-07 11:48:55.026 22337-22337/com.cy.hotfix.test.robust W/System.err: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:230) 2020-07-07 11:48:55.026 22337-22337/com.cy.hotfix.test.robust W/System.err: at java.lang.ClassLoader.loadClass(ClassLoader.java:379) 2020-07-07 11:48:55.026 22337-22337/com.cy.hotfix.test.robust W/System.err: at java.lang.ClassLoader.loadClass(ClassLoader.java:312) 2020-07-07 11:48:55.026 22337-22337/com.cy.hotfix.test.robust W/System.err: ... 18 more
看着是混淆过程中出了问题 (1)看一下是否有提供mapping.txt (2)可以把dex变成smali,然后对smali里面的com.cy.hotfix.test.aPatch换成com.cy.hotfix.test.AddClassTestPatch
应用补丁后:出现java.lang.ClassNotFoundException: Didn't find class "com.cy.hotfix.test.aPatch"异常;实际上补丁包中生成的补丁类是“com.cy.hotfix.test.AddClassTestPatch”,
异常类型:app运行时异常
手机型号:全部
手机系统版本:Android Q
Robust版本:0.4.99
Gradle版本:3.5.3
系统:如:Windows
堆栈/日志:
ava.lang.NoClassDefFoundError: Failed resolution of: Lcom/cy/hotfix/test/aPatch; 2020-07-07 11:48:55.025 22337-22337/com.cy.hotfix.test.robust W/System.err: at com.cy.hotfix.test.AddClassTestPatch.(Unknown Source:5)
2020-07-07 11:48:55.025 22337-22337/com.cy.hotfix.test.robust W/System.err: at com.cy.hotfix.test.AddClassTestPatchControl.accessDispatch(Unknown Source:38)
2020-07-07 11:48:55.025 22337-22337/com.cy.hotfix.test.robust W/System.err: at com.meituan.robust.PatchProxy.accessDispatch(PatchProxy.java:94)
2020-07-07 11:48:55.025 22337-22337/com.cy.hotfix.test.robust W/System.err: at com.meituan.robust.PatchProxy.proxy(PatchProxy.java:44)
2020-07-07 11:48:55.025 22337-22337/com.cy.hotfix.test.robust W/System.err: at com.cy.hotfix.test.a.a(Unknown Source:19)
2020-07-07 11:48:55.025 22337-22337/com.cy.hotfix.test.robust W/System.err: at com.cy.hotfix.test.activity.RobustTestActivity.q(RobustTestActivity.java:47)
2020-07-07 11:48:55.025 22337-22337/com.cy.hotfix.test.robust W/System.err: at com.cy.hotfix.test.activity.RobustTestActivity.onClick(RobustTestActivity.java:31)
2020-07-07 11:48:55.025 22337-22337/com.cy.hotfix.test.robust W/System.err: at android.view.View.performClick(View.java:7247)
2020-07-07 11:48:55.025 22337-22337/com.cy.hotfix.test.robust W/System.err: at android.view.View.performClickInternal(View.java:7224)
2020-07-07 11:48:55.025 22337-22337/com.cy.hotfix.test.robust W/System.err: at android.view.View.access$3500(View.java:819)
2020-07-07 11:48:55.025 22337-22337/com.cy.hotfix.test.robust W/System.err: at android.view.View$PerformClick.run(View.java:27551)
2020-07-07 11:48:55.025 22337-22337/com.cy.hotfix.test.robust W/System.err: at android.os.Handler.handleCallback(Handler.java:914)
2020-07-07 11:48:55.025 22337-22337/com.cy.hotfix.test.robust W/System.err: at android.os.Handler.dispatchMessage(Handler.java:100)
2020-07-07 11:48:55.025 22337-22337/com.cy.hotfix.test.robust W/System.err: at android.os.Looper.loop(Looper.java:225)
2020-07-07 11:48:55.025 22337-22337/com.cy.hotfix.test.robust W/System.err: at android.app.ActivityThread.main(ActivityThread.java:7594)
2020-07-07 11:48:55.025 22337-22337/com.cy.hotfix.test.robust W/System.err: at java.lang.reflect.Method.invoke(Native Method)
2020-07-07 11:48:55.025 22337-22337/com.cy.hotfix.test.robust W/System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
2020-07-07 11:48:55.025 22337-22337/com.cy.hotfix.test.robust W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
2020-07-07 11:48:55.026 22337-22337/com.cy.hotfix.test.robust W/System.err: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.cy.hotfix.test.aPatch" on path: DexPathList[[zip file "/data/user/0/com.cy.hotfix.test.robust/cache/patches/patch_temp.jar"],nativeLibraryDirectories=[/system/lib64, /system/product/lib64]]
2020-07-07 11:48:55.026 22337-22337/com.cy.hotfix.test.robust W/System.err: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:230)
2020-07-07 11:48:55.026 22337-22337/com.cy.hotfix.test.robust W/System.err: at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
2020-07-07 11:48:55.026 22337-22337/com.cy.hotfix.test.robust W/System.err: at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
2020-07-07 11:48:55.026 22337-22337/com.cy.hotfix.test.robust W/System.err: ... 18 more