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'.
Android Studio之以引用方式引用外部Library
解决方法:检查各个模块的build.gradle的buildToolsVersion是否一致




相关文章:

  • 2021-04-22
  • 2021-11-17
  • 2021-06-11
  • 2021-12-15
  • 2021-12-08
  • 2022-12-23
  • 2021-09-13
猜你喜欢
  • 2021-11-13
  • 2021-05-07
  • 2022-01-07
  • 2022-12-23
  • 2021-08-22
相关资源
相似解决方案