Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Manifest Merger failed with multiple errors in Android Studio

Tags:

android

xml

So, I am a beginner into Android and Java. I just began learning. While I was experimenting with Intent today, I incurred an error.

Error:Execution failed for task ':app:processDebugManifest'. > Manifest merger failed with multiple errors, see logs 

I found some solutions here and tried to implement them, but it did not work.

This is my build.gradle :

apply plugin: 'com.android.application'  android { compileSdkVersion 23 buildToolsVersion "23.0.0"  defaultConfig {     applicationId "com.example.rohan.petadoptionthing"     minSdkVersion 10     targetSdkVersion 23     versionCode 1     versionName "1.0" } buildTypes {     release {         minifyEnabled false         proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'     } } }  dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:23.0.0' } 

This is my AndroidManifest :

<?xml version="1.0" encoding="utf-8"?> 

package="com.example.rohan.petadoptionthing" >  <application      android:allowBackup="true"     android:icon="@mipmap/ic_launcher"     android:label="@string/app_name"     android:theme="@style/AppTheme" >     <activity         android:name=".MainActivity"         android:label="@string/app_name" >         <intent-filter>             <action android:name="android.intent.action.MAIN" />              <category android:name="android.intent.category.LAUNCHER" />         </intent-filter>     </activity>      <activity android:name=".Second"         />      <activity android:name=".third"/>     <activity android:name=".MainActivity"/>   </application> 

This is my first week with coding, I am sorry if this is a really silly thing. I am really new to this and did not find any other place to ask. Sorry if I broke any rules

like image 575
Rohan Avatar asked Mar 07 '16 11:03

Rohan


People also ask

How do I fix a failed manifest merger?

The initial process would be to open the manifest application known as the AndroidManifest. xml and then click on the Merged Manifest tab below your edit pane. Following which, Click on the merged manifest option. An Error would be visible at the right column and then one must try to solve the error.

How do I change AndroidManifest XML?

The Android manifest file is a specially formatted XML file. You can edit the XML manually by clicking on the AndroidManifest. xml tab. Android manifest files generally include a single <manifest> tag with a single <application> tag.

Why manifest XML file is important in Android app development?

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.


1 Answers

Open application manifest (AndroidManifest.xml) and click on Merged Manifest tab on bottom of your edit pane. Check the image below:

enter image description here

From image you can see Error in the right column, try to solve the error. It may help some one with the same problem. Read more here.

Also, once you found the error and if you get that error from external library that you are using, You have to let compiler to ignore the attribute from the external library. //add this attribute in application tag in the manifest

   tools:replace="android:allowBackup"                                                                                                                                                //Add this in the manifest tag at the top     xmlns:tools="http://schemas.android.com/tools" 
like image 128
CLIFFORD P Y Avatar answered Sep 21 '22 03:09

CLIFFORD P Y