1) 将外置lib copy到project->app->libs下
2) File->Project Structure->Dependencies->添加lib,并移到最上面
3) 更改build.gradle
project->gradle->build.gradle
allprojects {
repositories {
jcenter()
}
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs.add('-Xbootclasspath/p:app\libs\classes-full-debug.jar')
}
}
- 调整app.iml调整lib引用顺序
project->app->src->app.iml
将外置lib移到SDK前面:
<orderEntry type="library" exported="" name="classes-full-debug" level="project" />
<orderEntry type="jdk" jdkName="Android API 26 Platform" jdkType="Android SDK" />
网友评论