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:
If still not work, so we can add our library to build classpath. In application's build.gradle, add these:
I placed mylib.jar is in app/libs. There maybe some errors display on IDE, but application's build will be OK.
Try this ,In your modules's build.gradle file .
What you can do is adding your
.jar
in yourlibs
folder, then right clic on it and selectadd as a library
.Then if it doesnt work already, try to right clic on your project folder and select
Open Modules settings
. You can manage your dependency and your libraries there.Try this:
http://www.jianshu.com/p/a25a85b6372d
How to put my libraries in front of android.jar by editing build.gradle in Android-Studio