I had my own customized framework(android.jar) and want to use it within Android Studio. I had description in my build.gradle like:
dependencies {
compile files('myandroid.jar')
}
But Android Studio still use the default framework(android.jar). Expected situation is like Eclipse, I can arrange the order of libraries. In Android Studio, I can only arrange external libraries' order and have nothing to do with the default framework library. Is there a way to let my customized android.jar had higher order than the default one?
Thanks a lot!
Place this line inside your dependencies:
provided files('libs/myandroid.jar')
If still not work, so we can add our library to build classpath. In application's build.gradle, add these:
allprojects {
repositories {
jcenter()
}
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs.add('-Xbootclasspath/p:app\\libs\\mylibs.jar')
}
}
}
I placed mylib.jar is in app/libs. There maybe some errors display on IDE, but application's build will be OK.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With