Androidmanifest xml does not exist or has the wrong root tag
After I renamed the directory app/src/main
to app/src/bk
using the rename feature in Android Studio, I get the following error:
Androidmanifest xml does not exist or has the wrong root tag
I've already tried all the answers from here . Unfortunately none of them worked. I also looked at the problem report .
Is there a way to make this work?
At the moment of copying the directory bk
and renaming it into the main
error disappears and I can create the application.
source to share
I think its not allowed to rename app / src / main
The commented thing will never happen, because when we sync the project with the cradle, it by default replaces main
How can I change my main problem in any other problem, it cannot identify the manifest. so I am specifying the path to the manifest in gradle.build.
You can create a project if you add it to your Android build.gradle.
sourceSets {
main {
manifest.srcFile 'src/bk/AndroidManifest.xml'
}
}
and I got warnings like this.
Error:(33, 28) No resource found that matches the given name (at 'label' with value '@string/app_name').
Error:(24, 24) No resource found that matches the given name (at 'theme' with value '@style/AppTheme').
Error:(22, 23) No resource found that matches the given name (at 'icon' with value '@drawable/ic_launcher').
Error:(23, 24) No resource found that matches the given name (at 'label' with value '@string/app_name').
As per the warnings, the app cannot find drawables / strings associated with it as we are showing the path to the manifest indirectly.
Maybe I'm wrong. I am adding my assumptions according to my knowledge.
source to share