Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio Manifest Missing Error In Gradle

I'm trying to figure out what I've done to my project. I recently added ActionBarSherlock to my project under the main project/library/ActionBarSherlock. When I did that something happened to my manifest file path because now the project cannot find it and I'm getting this error on Debug.

Gradle:

FAILURE: Build failed with an exception.

  • What went wrong: A problem occurred configuring root project 'ToDoListProject'.

    Failed to notify project evaluation listener. Main Manifest missing from C:\Users\Chris Johnson\AndroidStudioProjects\ToDoListProject\src\main\AndroidManifest.xml

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

The reason it can't find the manifest is because it's located in the file

C:\Users\Chris Johnson\AndroidStudioProjects\ToDoListProject\ToDoList\src\main\AndroidManifest.xml 

How do I set it to the correct location again?

Thanks.

like image 981
chris84948 Avatar asked Jun 13 '13 20:06

chris84948


People also ask

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.

Where is manifest XML in Android?

Every project in Android includes a Manifest XML file, which is AndroidManifest. xml, located in the root directory of its project hierarchy. The manifest file is an important part of our app because it defines the structure and metadata of our application, its components, and its requirements.

What is manifest in Android Studio?

Every app project must have an AndroidManifest. xml file (with precisely that name) at the root of the project source set. The manifest file describes essential information about your app to the Android build tools, the Android operating system, and Google Play.


Video Answer


1 Answers

In the android section of your build.gradle file, you can try adding sourceSets with the manifest.srcFile variable.

android {   sourceSets {       main {           manifest.srcFile 'ToDoList/src/main/AndroidManifest.xml'       }   } } 

That path may need to be adjusted slightly.

like image 188
ootinii Avatar answered Sep 30 '22 21:09

ootinii