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

前端 未结 11 1706
天涯浪人
天涯浪人 2020-11-29 21:31

I got this error on Android Studio (AS): \"enter

How I got it:

I created an

相关标签:
11条回答
  • 2020-11-29 21:45

    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.

    0 讨论(0)
  • 2020-11-29 21:46

    I had this problem with a multi-module project when I renamed the app module. In my case to solve the problem I had to manually update the app module name in the project's settings.gradle file (Android Studio didn't update that value)

    0 讨论(0)
  • 2020-11-29 21:53

    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
    0 讨论(0)
  • 2020-11-29 21:54

    In my case:

    settings.gradle file was empty. I added defualt code:

    include ':app'
    

    Then I clicked

    Then project start works.

    0 讨论(0)
  • 2020-11-29 21:54

    I ran into a similar problem. Looks like my .../src directory for whatever reason moved under my .../lib directory. I moved it out of the /lib directory. Now both /lib and /src are at the same level. After a couple of clean rebuilds and restarts of Android studio everything is back to normal. My emulator started up fine.

    You might want to check your directory structure. Compare the directory structure with a working project. You might be able to see the difference.

    0 讨论(0)
  • 2020-11-29 21:54

    Happened to me. Found that i had wrongly opened the parent folder of the actual project in Android Studio.

    0 讨论(0)
提交回复
热议问题