陈建华的博客
专注web开发
The Xposed API classes are compiled into the module APK
2019-05-15 14:39:52   阅读21次
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不到想要的值。 




-----------------------------------------------------
转载请注明来源此处
原地址:#

-----网友评论----
暂无评论
-----发表评论----
微网聚博客乐园 ©2014 blog.mn886.net 鲁ICP备14012923号   网站导航