Closed Mikanoshi closed 9 years ago
I had the same issue a long time ago. Here's the thread and the solution: http://forum.xda-developers.com/xposed/loading-class-classes2-dex-t2852950
It's more like a workaround, too complicated for a problem that happens only on android 4.4 with a single apk. Why everything is working on Lollipop? Maybe v54 framework is missing something regarding to multidex?
This is a duplicate of #30. I would rather hook Application.attach()
: https://github.com/rovo89/XposedBridge/issues/30#issuecomment-68488797
Why everything is working on Lollipop?
Because ART supports multidex files. Dalvik does not. When the application starts, the class loader only knows the classes in classes.dex. The Xposed callback fires as early as possible, and therefore at the time you try to place the hook, the class is not there and you get those exceptions. Later, the application uses a support library to extract the classes2.dex file from the APK and make it known to the class loader.
I see no good way of handling multdex APKs on Dalvik automatically, so you'll have to place the hooks later as mentioned in the solutions you were linked to.
By the way, Facebook does (or did?) something very similar. There might be other apps with their own implementation as well. Xposed is just using the system's way to retrieve a class from a class loader - and if that class doesn't exist at that time, it can't be found.
Had same error here, i don't know why,manifest: targetapi and compilesdkversion 23, my phone is running 5.1.1, so it should work, but it doesn't work, then i changed the minsdkversion to 10 and worked, i think my problem is on android studio 2.x , something with instant run, anyone can explain me the reason or give me a workaround to use minsdkversion 18 again?
@Grohden Why do you think that your issue is the same? The error above happens on Android 4.4 and below, your device is 5.1.1. This issue has nothing to do with the minsdkversion. Please open a separate issue if you have the impression that you're running into an Xposed issue and clearly state what the issue is. Also 5.1.1 is SDK22: https://source.android.com/source/build-numbers.html
I started receiving many bug reports about my module causing Sense Home launcher crashes after its last update. Xposed cannot find some classes anymore, but they are certainly there and are public. This happens only on 4.4.x ROMs and all classes are from the classes2.dex so far, even if parent class is in classes.dex, some of its inner classes are in second dex and cannot be hooked.
APK: http://www.apkmirror.com/apk/htc-corporation/sense-home/sense-home-7-20-599309-2-android-apk-download/
Errors:
Also some class verification error: