Android Studio: Android Manifest doesn't exist

2019-01-07 06:32发布

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.

11条回答
我只想做你的唯一
2楼-- · 2019-01-07 07:01

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

查看更多
SAY GOODBYE
3楼-- · 2019-01-07 07:02

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.


Hope it helps :)

查看更多
淡お忘
4楼-- · 2019-01-07 07:05

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.

查看更多
Deceive 欺骗
5楼-- · 2019-01-07 07:05

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)

查看更多
该账号已被封号
6楼-- · 2019-01-07 07:05

In my case, it was my AndroidManifest.xml file, it was all messed up due to a new library that I added in my build.gradle. So I took the AndroidManifest.xml from my latest commit on Git and I replaced it the current one, and also my settings.gradle was empty so I added include ':app'.

Hope it helps, and happy coding !

查看更多
啃猪蹄的小仙女
7楼-- · 2019-01-07 07:07

Just call (in any case) File -> Invalidate Caches and Restart....

查看更多
登录 后发表回答