Android Studio之以引用方式引用外部Library

1.在setting.gradle中添加外部library的文件地址,绝对地址以及相对地址均可,new File('../unity_base_dev_helper')表示在主工程目录。
project(':unity_android_dev_helper').projectDir = new File('D:/DevWorkSapce/GithubWorkSpace/AndroidUnityLab/unity_base_dev_helper')
2.在setting.gradle中添加新的依赖库
include ':app', ':unity_android_dev_helper'
3.在需要使用unity_base_dev_helper依赖库的模块添加引用
compile project(':unity_android_dev_helper')
此时,对unity_base_dev_helper模块的修改能同步至引用其的任何项目。

问题总结

1.BUILD FAILED
Execution failed for task ':transformClassesWithDexForArmv7Debug'.
解决方法:检查各个模块的build.gradle的buildToolsVersion是否一致




posted @ 2016-08-18 09:18  小轩948  阅读(2370)  评论(0编辑  收藏  举报