Android Studio: Android Manifest doesn't exists or has incorrect root tag
Solution 1
On Android Studio v0.8.2 clicking on Sync project with Gradle files
button solved my problem.
update
Thanks to the comment of jaumard. If the Sync project with Gradle files
it's not visible you have to open the Gradle panel and click sync icon on top the toolbar.
Solution 2
Just call (in any case) File -> Invalidate Caches and Restart....
Solution 3
In my case:
settings.gradle file was empty. I added defualt code:
include ':app'
Then I clicked
Then project start works.
Solution 4
Double check that under project structure / module / Manifest file it points to the correct manifest file in your code and not the one in generated sources.
This is true for both Android Studio and Intelli J. Sometime when you import project from existing sources it prefer the manifest file inside the generates sources directory.
Solution 5
What helped for me was:
- delete .gradle/ folder
- delete .idea/ folder
- delete ****.idea*** file
- reopen Android Studio
- import from gradle as Android Studio then suggests
Paschalis
Updated on November 11, 2021Comments
-
Paschalis over 2 years
I got this error on Android Studio (AS):
How I got it:
I created an AS Project from scratch and everything was fine. Then a popup showed up, and (if I recall correctly) was saying something like: "
Android Framework detected
". I pressed "Yes' and some changes happened to the project/module. And after that I got the above errorEdit:
In my case the problem was not
Gradle
related. It had to do withIntelliJ
/Android Studio
configuration, an.iml
file in particular. I realized that after reading this informative post here. -
Edwin Evans almost 10 yearsWorked for me. I tried Synchronize in the context menu but that didn't work but pressing this button did. Thanks for the picture!
-
reixa over 9 yearsGreat to see this helped! :D
-
sobelito over 9 yearsCame about when I tried to change Project name, directory, and such.
-
cV2 over 9 yearsfound the solution in git, after moving a project to a differnt folder, as described, some config after re-opening (importing) was wrong.
-
Paschalis over 9 yearsFunny enough, after a year, I faced this problem again. While on the first time the error was very weird, this time a pretty straightforward and only a sync was necessary. (that's why I am accepting the answer) However, it can be caused by different reasons, that's why there are various answers..
-
reixa over 9 yearsThanks. Hope all the answers keep helping people.
-
untill over 9 yearsThe button moved a bit in 0.8.14, but its still there, and it still helps.
-
jaumard over 9 yearsFor people with intelliJ sync button is not visible you have to open Gradle panel and click sync icon on top toolbar
-
John Dorian over 9 yearsThank you so much! This was a big help for me
-
Raffaeu about 9 yearsI had the same issue after I moved my project to a different folder. Tried all possible solution and this "magic icon" is the only one that fix my problem. Kudo
-
heloisasim almost 9 years^ same here, I had this issue when I changed the folder name. Then I synced the project and it worked! Thanks.
-
Warblr over 8 yearswas the only solution here that worked for me. thank you @armansimonyan13
-
Danpe over 8 yearsIt is not, because the AndroidManifest.xml used to be in a different location which worked before.
-
Anikeev Gennadiy over 8 yearsAll "gradle" options in the "find action" menu are disabled for me, yet I have this error.
-
jameshfisher almost 8 yearsThis makes no difference.
-
KAUSHAL J. SATHWARA almost 8 yearsHello i am new in Android studio. i am import my ionic framework project in android studio but its run time give Error "Android Manifest doesn't exists or has incorrect root tag" which one you tell above button it's not i am seen in my android studio. please help me. and i am using MAC System.
-
MRT about 5 yearsI am using MAC OS.(10.13.2) - Android Studio (3.3.2). This Button is not available for me. Can you guide me for Manual update OR any flow to visible this button ?? Any suggestion will appreciated. Thanks
-
MRT about 5 yearsI am using MAC OS.(10.13.2) - Android Studio (3.3.2). This solution is not working for me ?? Any suggestion will appreciated. Thanks
-
Raj almost 3 years@cv2, can you provide me the link for the solution in git ?
-
cV2 almost 3 yearsHey there, sorry that wasn't a public project. Just delete your complete configurations (also hidden folders) and try to reimport everything "clean" again. Good luck!