在使用xposed api 时遇到上述错误日志,这个错误的原因是把xposed相关实现模块编译到了apk中。只要把相关的jar包去掉就行了,你可以是使用的implementation 需要改成compileOnly,android studio 里就是修改build.gradle就可以了,关键部分我贴出来,拿走不谢
dependencies {
implementation 'com.google.android.material:material:1.1.0'
implementation 'androidx.annotation:annotation:1.1.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.1.0'
//implementation 'net.grandcentrix.tray:tray:0.12.0'
compileOnly 'de.robv.android.xposed:api:82'
compileOnly 'de.robv.android.xposed:api:82:sources'
compileOnly fileTree(dir: "libs", include: ["*.jar"])
implementation 'net.dongliu:apk-parser:2.6.9'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
testImplementation 'org.json:json:20140107'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}