创建模块而不复制文件时出现此错误settings.gradle:

include ':libraries:ProjectB'
project(':ProjectB').projectDir = new File('libraries/ProjectBRoot/ProjectB')

和在
dependencies {
  .....
  compile project(':ProjectB')
}

错误:
Error:Project with path ':ProjectB' could not be found.

有人遇到这个问题吗?任何帮助将不胜感激。

最佳答案

您的settings.gradle应该是:

include ':ProjectB'
project(':ProjectB').projectDir = new File('libraries/ProjectBRoot/ProjectB')

然后你的build.gradle:
dependencies {
  .....
  compile project(':ProjectB')
}

关于android - 找不到':ProjectName',我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/30150998/

10-11 21:33