Java – the class ref in the pre validation class resolves to an unexpected implementation

I am using Android studio and developing the xposed framework module Most of my users can use my application normally, but two of them have problems. Paste it below I did some searching and tried to fix it (removing duplicate classes and changing the jar library required by my application from 'compile' to 'provide') and had no luck It's hard for me to debug this and reproduce the user's problems How can I solve this problem?

java.lang.IllegalAccessError: Class ref in pre-verified class resolved to unexpected implementation 
    at dalvik.system.DexFile.defineClassNative(Native Method) 
    at dalvik.system.DexFile.defineClass(DexFile.java:222) 
    at dalvik.system.DexFile.loadClassBinaryName(DexFile.java:215) 
    at dalvik.system.DexPathList.findClass(DexPathList.java:322) 
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:54) 
    at java.lang.ClassLoader.loadClass(ClassLoader.java:497) 
    at java.lang.ClassLoader.loadClass(ClassLoader.java:457) 
    at de.robv.android.xposed.XposedBridge.loadModule(XposedBridge.java:421) 
    at de.robv.android.xposed.XposedBridge.loadModules(XposedBridge.java:386) 
    at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:120) 
    at dalvik.system.NativeStart.main(Native Method)

Solution

Open module settings – application – dependencies

Xposed * Jar scope changed to provided

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>