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

前端 未结 11 1438
陌清茗
陌清茗 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:05

    In my case, my android project got corrupted and some of the files were showing characters, binary numbers, etc. I tried the following solutions

    1. Invalidate & Restart
    2. Rebuild Project
    3. Sync with Gradle File

    But none of the above solutions worked for me.

    Then I just deleted the cache folder under C:\Users\username\.AndroidStudio3.6\system

    and all the invalid characters disappeared and the actual contents of all the files were displayed. This solution worked for me.

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

    1.Check whether the manifest file is there or not.

    2.If it is there, check whether the package name is correct or not..

    3.If you project has small number of classes, then you create new project in android and then copy paste your code from eclipse. It will be simple. But it is recommended only for small project.

    And finally click 'Sync' in the Gradle file. Followed by Rebuilding the project will do a trick.

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

    Every Android project needs a file called AndroidManifest.xml to tell Android about itself. Either your project doesn't have one, or it's not in the place that Android Studio expects it to be. Try to find it, and move it to the root folder of the project.

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

    Go to C drive click User then select your android studio folder then select System find Cache folder and delete this folder before doing this close your android Studio.It will surely work.

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

    In my case the Manifest file seemed to be corrupted or maybe its meta data. Trying to open it in Android Studio will show some characters that you see when opening a binary file with a text editor, for ex. Anyway, my project is under Git, so I just deleted it and restored it back, problem fixed.

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

    Click on File > Invalidate Cache/Restart, and that's it. Your project should start working.

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