0

I'm a beginner to android application development and i am unable to use com.android.support:appcompat-v7 support library.

I added dependencies to the project module in this way,

Project structure -> Module -> Dependencies -> Add Library Dependencies(then selected com.android.support:appcompat-v7:+) Finally Sync Project with gradle files.

Everything works fine while programming but whiling running the app it gives me an error saying " Error:Execution failed for task ':app:processDebugManifest'.

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

build.gradle file contains

apply plugin: 'com.android.application'

android {
    compileSdkVersion 20
    buildToolsVersion '20.0.0'
    defaultConfig {
        applicationId 'digiapes.harsha.apeonomy'
        minSdkVersion 16
        targetSdkVersion 20
        versionCode 1
        versionName '1.0'
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    productFlavors {
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile files('libs/android-support-v4.jar')
    compile 'com.android.support:appcompat-v7:+'
}
Harsha
  • 659
  • 10
  • 23

1 Answers1

3

Replace:

compile 'com.android.support:appcompat-v7:+'

with:

compile 'com.android.support:appcompat-v7:19.1.0'

and see if that helps. You are pulling in an "L" Developer Preview version of the dependency, which will not work well in your case.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • i changed the target sdk version and compile sdk version to 19, it now gives unexpected top-level exception.. – Harsha Aug 12 '14 at 13:58
  • @Harsha: [Examine LogCat](http://stackoverflow.com/questions/23353173/unfortunately-myapp-has-stopped-how-can-i-solve-this) to see where your problem is. If you cannot make sense of the Java stack trace, ask a separate Stack Overflow question where you supply that stack trace along with the relevant code. – CommonsWare Aug 12 '14 at 14:09