panhongwei / AndroidMethodHook

android art hook like Sophix
281 stars 76 forks source link

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/android/dex/Leb128; #7

Closed wyhuan closed 7 years ago

wyhuan commented 7 years ago

android 0 上运行有如下日志,请看一下如何解决:

com.panda.hook.andhook E/AndroidRuntime: FATAL EXCEPTION: main Process: com.panda.hook.andhook, PID: 8007 java.lang.NoClassDefFoundError: Failed resolution of: Lcom/android/dex/Leb128; at com.android.dx.dex.file.StringDataItem.writeSize(StringDataItem.java:53) at com.android.dx.dex.file.StringDataItem.(StringDataItem.java:38) at com.android.dx.dex.file.StringIdItem.addContents(StringIdItem.java:90) at com.android.dx.dex.file.UniformItemSection.prepare0(UniformItemSection.java:75) at com.android.dx.dex.file.Section.prepare(Section.java:213) at com.android.dx.dex.file.DexFile.toDex0(DexFile.java:509) at com.android.dx.dex.file.DexFile.toDex(DexFile.java:214) at com.android.dx.DexMaker.generate(DexMaker.java:323) at com.android.dx.DexMaker.generateAndLoad(DexMaker.java:421) at com.panda.hook.javahook.HookManager.beginHook(HookManager.java:123) at com.panda.hook.javahook.HookManager.addNeedsMethod(HookManager.java:192) at com.panda.hook.javahook.HookManager.startHooks(HookManager.java:183) at com.panda.hook.andhook.APP.attachBaseContext(APP.java:89) at android.app.Application.attach(Application.java:189) at android.app.Instrumentation.newApplication(Instrumentation.java:1102) at android.app.Instrumentation.newApplication(Instrumentation.java:1086) at android.app.LoadedApk.makeApplication(LoadedApk.java:965) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5765) at android.app.ActivityThread.-wrap1(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1661) at android.os.Handler.dispatchMessage(Handler.java:105) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6541) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)

wyhuan commented 7 years ago

加载 dalvik-dx-7.1.0_r7的问题 已解决