dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) compile 'com.android.support:appcompat-v7:25.3.1' testCompile 'junit:junit:4.12' provided files('lib/XposedBridgeApi-54.jar') }
坑一.这里注意:
provided files('lib/XposedBridgeApi-54.jar')
得是provided的,否则日志里会出现E(error)的log。
The Xposed API classes are compiled into the module's APKThe Xposed API classes are compiled into the module's APK
坑二。build的时候:
disable Instant Run ( File -> Settings -> Build, Execution, Deployment -> Instant Run), otherwise your classes aren't included directly in the APK, but loaded via a stub application which Xposed can't handle.
否则日志中不报错,但hook不到想要的值。
-----------------------------------------------------
转载请注明来源此处
原地址:#
发表