在我将文件settings.gradle
更改为以下内容(添加第三行)后,我尝试同步一个Android项目
include ':app'
include ':libraries:volley'
project(':LibraryModule').projectDir = new File('/home/alexander/Projects/AndroidStudio/LibraryProject/LibraryModule')
以便在我当前的项目中使用LibraryModule
中的代码。但是,同步失败并显示以下消息:
Error:Project with path ':LibraryModule' could not be found.
但文件/home/alexander/Projects/AndroidStudio/LibraryProject/LibraryModule
确实存在并包含以下两个文件:
LibraryModule/build/outputs/aar/LibraryModule-debug.aar
LibraryModule/build/outputs/aar/LibraryModule-release.aar
这次有什么问题??
答案 0 :(得分:1)
试试这个:
include ':app'
include ':libraries:volley'
include ':LibraryModule'
project(':LibraryModule').projectDir = new File('/home/alexander/Projects/AndroidStudio/LibraryProject/LibraryModule')