在 https://github.com/yixia/VitamioBundle 下载 VitamioBundle 工程,解压之后将里面的 vitamio 作为 module 导入自己的工程,并添加为依赖
添加依赖时,需要将 vitamio module 下的 build.gradle 文件的配置修改为我们自己项目 module 下的 build.gradle 中的一致,并且将首行改为
apply plugin: 'com.android.library'
修改完之后 rebuild 一下,因为使用了另一个 module 当 Library,可能还会遇到
Android studio Gradle icon error, Manifest Merger
的错误,
此时按照 error suggestion, 我们把形如android:replace="android:icon"
之类的代码添加到自己 module 下的 Manifest 文件下的 Application 标签内,意思是使用此 module 下的 Manifest 中的 Application 配置这样就可在自己的项目中使用 Vitamio 了。
参考 :http://stackoverflow.com/error-manifest-merger
http://www.cnblogs.com/happyhacking/p/5365192.html