Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

People also ask

What is the root tag of manifest file in Android?

manifest is the root element of the AndroidManifest. xml file. It has package attribute that describes the package name of the activity class.

Where is the manifest file in Android Studio?

The file is located at WorkspaceName>/temp/<AppName>/build/luaandroid/dist. The manifest file provides essential information about your app to the Android operating system, and Google Play store. The Android manifest file helps to declare the permissions that an app must have to access data from other apps.

How do I find the manifest file in apk?

Go to Build > Analyze APK... and select your apk. Then you can see the content of the AndroidManifest file.


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.


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


In my case:

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

include ':app'

Then I clicked

Sync Project with Gradle Files

Then project start works.


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.


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

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.