Android studio 环境配置

写xposed用到了AS:D

1、首次启动AS,自动下载SDK,而SDK在墙外。修改android studio/bin/idea.properties,添加

disable.android.first.run=true

启动后管理SDK,神奇般的可以下载了。后面的AVD也可以下载。

2、总是indexing

invalidate cache / restart

3、新增依赖

新建lib文件夹,将jar包复制到lib,右键jar文件,add as library...

4、build APK时,报more than one file was found with OS independent path ' ',在模块的build.gradle中Android项中添加

packagingOptions {
        pickFirst 'META-INF/*'
}

错误消失,有的贴不是上面的pickFirst,而是exclude

5、xposed日志中报The Xposed API classes are compiled into the module's APK,在build.gradle中的dependencies中指定为provided:

provided files('lib/XposedBridgeApi-54.jar')

6、取消便捷启动

File -> Settings -> Build, Execution, Deployment -> Instant Run
原文地址:https://www.cnblogs.com/chenhuanBlogs/p/10310800.html