Android Studio: How to link my .aar library to mul

2019-04-14 16:21发布

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条回答
狗以群分
2楼-- · 2019-04-14 17:07

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.

查看更多
登录 后发表回答