I got this error on Android Studio (AS):
I created an
Just call (in any case) File -> Invalidate Caches and Restart....
Moving my AndroidManifest.xml
to PROJECT_NAME/src/main
fixed the issue.
I had the same errormessage and noticed I had 2 MYPROJECTNAME.iml files, but with a different casing of MYPROJECTNAME. I created this situation after checking out from SVN the project into a directory with the casing error. Just throw away the IML file with the wrong casing, after saving the content of both and use the content that works
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 !
On Android Studio v0.8.2 clicking on Sync project with Gradle files
button solved my problem.
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 :)