Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle: Execution failed for task ':processDebugManifest'

Found the solution to this problem:

gradle assemble -info gave me the hint that the Manifests have different SDK Versions and cannot be merged.

I needed to edit my Manifests and build.gradle file and everything worked again.


To be clear you need to edit the uses-sdk in the AndroidManifest.xml

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

and the android section, particularly minSdkVersion and targetSdkVersion in the build.gradle file

android {
    compileSdkVersion 17
    buildToolsVersion "17.0.0"

    defaultConfig {
        minSdkVersion 14
        targetSdkVersion 16
    }
}

In a general way, to see what is the error, you can see the merged Manifest File in Android studio

Go on your manifest file

enter image description here

Click on the bottom tab "Merged Manifest"

enter image description here

On the right screen, in "Other Manifest Files", check for any error due to graddle :

enter image description here


I wish the Lukas Olsen solution works for other scenarios, But in my case is quite different.

I faced the same while add ActionBarShelock to project, by comparing to the older library I found that application tag is missing in manifest. By adding one line I fixed my issue.

</application>

This appears to occur because Google Play Services require Android 2.2, which is SDK version 8.

In build.gradle, make sure your minSdkVersion is at least 8. The default appears to be 7. So you have something like this:

android {
    compileSdkVersion 17
    buildToolsVersion "17.0.0"

    defaultConfig {
        minSdkVersion 8
        targetSdkVersion 16
    }
}

dependencies {
    compile 'com.android.support:support-v4:13.0.+'
    compile 'com.google.android.gms:play-services:3.1.36'
}

i solved by putting this one line in application tag...

tools:node="replace"


I also faced this error when I was adding firebase push notifications in my app. but in my case I was doing a very silly mistake which i noticed after some time. I declared below code in manifest two times. After removing duplicate declaration. my issue solved.

        <service   android:name="com.evampsaanga.mytelenor.firebase.MyFirebaseInstanceIDService">
        <intent-filter>
            <action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
        </intent-filter>
    </service>`

so you also check if there is anything duplicate in your app manifest file.