I have a build.gradle project located in the myApp/app/ directory. AndroidManifest.xml is located in the myApp/app/src/main directory at the same level as the java/ and res/ directories.
When synchronizing a project, I get a notification about a missing manifest file. No wonder, in fact, when the path is really wrong. The source file is installed as:
sourceSets { main { manifest.srcFile 'src/main/AndroidManifest.xml' } }
and an error notification reports:
Error:Cause: java.io.FileNotFoundException: /home/aqv/AndroidStudioProjects/myApp/src/main/AndroidManifest.xml (No such file or directory)
When I change the source to:
sourceSets { main { manifest.srcFile 'main/AndroidManifest.xml' } }
the text changes to:
Error:Cause: java.io.FileNotFoundException: /home/aqv/AndroidStudioProjects/myApp/app/main/AndroidManifest.xml (No such file or directory)
As you can see, the path fragment is missing: myApp/app/src/ (when setting the src/main/AndroidManifest.xml path, the error says to search for the manifest file in myApp/src/main , so it truncates the app/ directory).
Is this some kind of gradle error or is my project not configured correctly?
In search of a solution, I found one thread in SO, but the solution from there did not work in my case. I have dependencies installed as:
compile 'com.android.support:support-v4:19.1.0' compile 'com.android.support:appcompat-v7:19.1.0'
android android-studio android-manifest gradle
AbreQueVoy
source share