0

Recently I was receiving this error.

Manifest merger failed : uses-sdk:minSdkVersion 11 cannot be smaller than version L

So I changed it to

  minSdkVersion 'L'

And then I got this error

Failure [INSTALL_FAILED_OLDER_SDK]

So I guess I did not resolve the first error correctly.

I'm not exactly sure what to do. I've been following this:

Manifest merger failed : uses-sdk:minSdkVersion 10 cannot be smaller than version L declared in library com.android.support:appcompat-v7:21.0.0-rc1

Manifest merger failed : uses-sdk:minSdkVersion 14

http://www.reddit.com/r/androiddev/comments/297xli/howto_use_the_v21_support_libs_on_older_versions/

but strangely no luck.

This is what I have:

   apply plugin: 'android'

android {
    compileSdkVersion 21
    buildToolsVersion '20.0.0'
    defaultConfig {
        applicationId 'com.spicycurryman.getdisciplined10.app'
        minSdkVersion 15
        targetSdkVersion 21
        versionCode 1
        versionName '1.0'
    }


    buildTypes {
        debug {
            applicationIdSuffix '.dev'
        }
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    productFlavors {
    }
}

dependencies {

    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:21.+'
    compile project(':seekArc_library')
}

EDIT: This is what I am using now

New build:

apply plugin: 'android'

android {
    compileSdkVersion 19
    buildToolsVersion '19.1.0'
    defaultConfig {
        applicationId 'com.spicycurryman.getdisciplined10.app'
        minSdkVersion 14
        targetSdkVersion 19
        versionCode 1
        versionName '1.0'
    }


    buildTypes {
        debug {
            applicationIdSuffix '.dev'
        }
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    productFlavors {
    }
}
dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:19.1.+'
    compile 'com.android.support:support-v4:19.1.+'
    compile project(':seekArc_library')

}

Unfortunately this is not working as well. I am not sure why the specified version is not being compiled.

Community
  • 1
  • 1
Rohit Tigga
  • 2,373
  • 9
  • 43
  • 81

2 Answers2

0

It appears that the device or emulator where you are deploying the app is running a version of Android that is prior to "L". Either use the "L" emulator or change your "build.gradle" file to require a lower version (i.e. change the "targetSdkVersion" and "compileSdkVersion" to something lower).

AndroidGuy
  • 3,371
  • 1
  • 19
  • 21
  • I am try to run it on my samsung galaxy s4 I made an edit to the post to my new build and the output says Manifest merger failed uses-sdk minSdkVersion 14 cannot be smaller than version L declared in library com.android. support -v4:21.0.0-rc1 – Rohit Tigga Jul 03 '14 at 19:27
0

I found out that in order to force my compiler the compile the specified version I need to include the following:

configurations.all {
    resolutionStrategy {
        force 'com.android.support:support-v4:20.+'
        force 'com.android.support:appcompat-v7:20.+'
    }
}

Seems like a bug with the new Android L preview update.

Rohit Tigga
  • 2,373
  • 9
  • 43
  • 81