“AndroidManifest.xml doesn't exist or has incorrect root tag” Error

前端 未结 11 1440
陌清茗
陌清茗 2021-01-17 07:29

I am new to AndroidStudio AND Gradle.

I imported a project from eclipse, created a module, and tried to run the project, but I got this error:

Androi         


        
相关标签:
11条回答
  • 2021-01-17 08:18

    For me the issue went away once I opened the android folder of the project in Android Studio to run the project.

    So basically, because I was trying to run the Android project from the Root folder, it gave me the error. We need to run the project by selecting the android folder of the project only.

    Hope this helps someone!

    0 讨论(0)
  • 2021-01-17 08:19
    1. Close your Android Studio
    2. Goto C:\Users\user\.AndroidStudioX.X\system and DELETE the cache folder
    3. Launch the Sndroid Studio
    4. Goto Build (menu) -> Clean Project when done click the Build (menu) again and click rebuild project.

    That should solve the problem.

    0 讨论(0)
  • 2021-01-17 08:19

    For me clicking on Sync project with Gradle files button did not solve the problem alone.

    After Syncing project with Gradle files, I explicitly had to invalidate the cache and restart studio. Only after this action, the red cross-mark over configuration disappeared and everything started working.

    0 讨论(0)
  • 2021-01-17 08:22

    I also had this problem, things I tried:

    1. Syncing the file with gradle
    2. Invalidate/Restart But the problem was still there in the manifest folder-> manifest.xml file it had only 1 line.
    3. So I went to User-> your_username -> Android Studio v -> caches and Deleted the cache folder. Started Android Studio, and my problem was gone. But I am not sure which of these might solve yours.
    0 讨论(0)
  • 2021-01-17 08:24

    clicking on Sync project with Gradle files button will solve your problem.

    That button is under File section on Android Studio 3.6.1

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