0
votes

I can getting the following error: Error:Execution failed for task ':app:processDebugManifest'.

Manifest merger failed : uses-sdk:minSdkVersion 15 cannot be different than version L declared in library .../com.android.support/recyclerview-v7/21.0.0-rc1/AndroidManifest.xml

Below is my build.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.1"

    defaultConfig {
        minSdkVersion 15
        targetSdkVersion 20
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:recyclerview-v7:21.0.0-rc1'
    compile 'com.android.support:cardview-v7:21.0.0-rc1'
    ...

}

Using

<uses-sdk
    tools:node="replace" />

does not work anymore.

I have looked at this. The solution suggested place following code in gradle.build

android.applicationVariants.all { variant ->
variant.processResources.manifestFile = file('src/main/AndroidManifest.xml')
variant.processManifest.enabled=false }

But I get error

Error:(21, 0) Could not find property 'processResources' on com.android.build.gradle.internal.api.ApplicationVariantImpl_Decorated@dac7b2d.

No matter where I place the code in gradle.build

1

1 Answers

1
votes

Replace:

compile 'com.android.support:recyclerview-v7:21.0.0-rc1'
compile 'com.android.support:cardview-v7:21.0.0-rc1'

with:

compile 'com.android.support:recyclerview-v7:21.0.0'
compile 'com.android.support:cardview-v7:21.0.0'

to use the production release versions of those libraries, instead of the L-only preview versions. They will work back to API Level 7.