Android Studio: Android Manifest doesn't exists or has incorrect root tag

101,663

Solution 1

On Android Studio v0.8.2 clicking on Sync project with Gradle files button solved my problem.

Screenshot of Android Studio toolbar with "Sync project with Grandle files" button highlighted.

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

Sync Project with Gradle Files

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
Share:
101,663
Paschalis
Author by

Paschalis

Updated on November 11, 2021

Comments

  • Paschalis
    Paschalis over 2 years

    I got this error on Android Studio (AS): enter image description here

    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 error

    Edit:

    In my case the problem was not Gradle related. It had to do with IntelliJ/Android Studio configuration, an .iml file in particular. I realized that after reading this informative post here.

  • Edwin Evans
    Edwin Evans almost 10 years
    Worked for me. I tried Synchronize in the context menu but that didn't work but pressing this button did. Thanks for the picture!
  • reixa
    reixa over 9 years
    Great to see this helped! :D
  • sobelito
    sobelito over 9 years
    Came about when I tried to change Project name, directory, and such.
  • cV2
    cV2 over 9 years
    found the solution in git, after moving a project to a differnt folder, as described, some config after re-opening (importing) was wrong.
  • Paschalis
    Paschalis over 9 years
    Funny 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
    reixa over 9 years
    Thanks. Hope all the answers keep helping people.
  • untill
    untill over 9 years
    The button moved a bit in 0.8.14, but its still there, and it still helps.
  • jaumard
    jaumard over 9 years
    For people with intelliJ sync button is not visible you have to open Gradle panel and click sync icon on top toolbar
  • John Dorian
    John Dorian over 9 years
    Thank you so much! This was a big help for me
  • Raffaeu
    Raffaeu about 9 years
    I 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
    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
    Warblr over 8 years
    was the only solution here that worked for me. thank you @armansimonyan13
  • Danpe
    Danpe over 8 years
    It is not, because the AndroidManifest.xml used to be in a different location which worked before.
  • Anikeev Gennadiy
    Anikeev Gennadiy over 8 years
    All "gradle" options in the "find action" menu are disabled for me, yet I have this error.
  • jameshfisher
    jameshfisher almost 8 years
    This makes no difference.
  • KAUSHAL J. SATHWARA
    KAUSHAL J. SATHWARA almost 8 years
    Hello 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
    MRT about 5 years
    I 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
    MRT about 5 years
    I 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
    Raj almost 3 years
    @cv2, can you provide me the link for the solution in git ?
  • cV2
    cV2 almost 3 years
    Hey 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!