Alex Alex - 11 days ago 6
Android Question

Android sync failed: Project could not be found

I tried to sync an android project after I have changed the file

settings.gradle
to the following content (added the third line)

include ':app'
include ':libraries:volley'
project(':LibraryModule').projectDir = new File('/home/alexander/Projects/AndroidStudio/LibraryProject/LibraryModule')


in order to use the code in
LibraryModule
in my current project. However the sync fails with the following message:

Error:Project with path ':LibraryModule' could not be found.


But the file
/home/alexander/Projects/AndroidStudio/LibraryProject/LibraryModule
does exist and contains the following two files:

LibraryModule/build/outputs/aar/LibraryModule-debug.aar
LibraryModule/build/outputs/aar/LibraryModule-release.aar


What is wrong this time...?

Answer

Try this:

include ':app'
include ':libraries:volley'
include ':LibraryModule'
project(':LibraryModule').projectDir = new  File('/home/alexander/Projects/AndroidStudio/LibraryProject/LibraryModule')
Comments