问题
I have a library that I use in multiple projects. Every time I update (and rebuild) this library, I do not want to have to copy and paste the .aar to EVERY single project that uses this library. What is the most convenient, efficient way to accomplish this?
Note: I'm running Android Studio 1.0 RC2 on Mac OSX.
回答1:
Upload your android library as an artifact to maven central or jcenter. Checkout this guide that i totally find worth mentioning here to understand how to upload your android library to one of these central repository or both.
Once uploaded and synced , you can simply reference your library using
dependencies {
compile 'com.your.groupid:artifactid:x.x.x'
}
and thats it.
来源:https://stackoverflow.com/questions/27218299/android-studio-how-to-link-my-aar-library-to-multiple-projects