Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio - Gradle Manifest Merging Failed

I am building a demo app using actionbar sherlock in android studio and i was facing problem , mentioned in following link :- Previous Problem

now after following the replies posted on above link i did some changes and now i am facing this

Gradle: Execution failed for task ':SherlockTest:processDebugManifest'.
> Manifest merging failed. See console for more info.

my application manifest file is :-

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.sherlocktest"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="10"
        android:targetSdkVersion="16" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="com.example.sherlocktest.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>
    </application>

</manifest>

and actionbar sherlock manifest file is :-

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          android:versionCode="440"
          android:versionName="4.4.0"
          package="com.actionbarsherlock">

  <uses-sdk
          android:minSdkVersion="10"
          android:targetSdkVersion="16"/>

  <application/>

</manifest>

i am not able to figure out what is the problem here, please help

like image 618
r4jiv007 Avatar asked Jul 31 '13 05:07

r4jiv007


People also ask

How do I fix error manifest merger failed?

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 fix manifest merger failed with multiple errors?

The following hack works: Add the xmlns:tools="http://schemas.android.com/tools" line in the manifest tag. Add tools:replace="android:icon,android:theme,android:allowBackup,label,name" in the application tag.

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.


1 Answers

Make sure that in all your build.gradle scripts the minSdkVersion and targetSdkVersion correspond to those you have in your manifests:

android {
    defaultConfig { 
       minSdkVersion 10
       targetSdkVersion 16
    }
}

This worked for me, I hope it does the trick for you, cheers.

like image 148
Max Raskin Avatar answered Oct 22 '22 03:10

Max Raskin