Android Studio gradle doesn't compile the specified version -


i've been developing small project days today, android studio started give me error

error:execution failed task ':app:processdebugmanifest'. > manifest merger failed : uses-sdk:minsdkversion 14 cannot smaller version 14 declared in library com.android.support:support-v4:21.0.0-rc1 

i understood because it's trying compile library of android-l. version want compile old version won't. keeps giving me above error no matter version enter. here dependencies.

dependencies {     compile filetree(dir: 'libs', include: ['*.jar'])     compile 'com.android.support:appcompat-v7:20.+'     compile 'com.android.support:support-v4:20.+' } 

update

i installed android studio beta , changed dependencies 1 eugen suggested below. syncing project gives same error no matter version of appcompat, support version specify. gives error every single time sync

uses-sdk:minsdkversion 14 cannot smaller version l declared in library com.android.support:support-v4:21.0.0-rc1 

my updated dependencies

dependencies {     compile filetree(dir: 'libs', include: ['*.jar'])     compile 'com.android.support:appcompat-v7:19.+'     compile 'com.android.support:support-v4:19.+' } 

update 2

i don't think understand dependencies system of android studio correctly. removed both appcompat , support dependencies , still gives me same error. have remove included libraries somewhere?

build.gradle

*note - added 2 libraries in again , tried syncing, in case. no chenges.

apply plugin: 'android'  android {     compilesdkversion 19     buildtoolsversion "19.1.0"      defaultconfig {         applicationid "taz.starz.footynews"         minsdkversion 14         targetsdkversion 19         versioncode 1         versionname "1.0"     }     buildtypes {         release {             runproguard false             proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro'         }     } }  dependencies {     compile filetree(dir: 'libs', include: ['*.jar'])     compile 'com.android.support:appcompat-v7:19.+'     compile 'com.android.support:support-v4:19.+'     compile project(':parallaxscroll')     compile files('src/main/libs/header2actionbar-0.2.1.jar')     compile 'com.arasthel:gnavdrawer-library:+'     compile 'com.koushikdutta.ion:ion:1.2.4' } 

top level build.gradle

// top-level build file can add configuration options common sub-projects/modules. buildscript {     repositories {         mavencentral()     }     dependencies {         classpath 'com.android.tools.build:gradle:0.12.+'     } }  allprojects {     repositories {         mavencentral()     } } 

update: found real fix case. make sure none of dependencies silently including support-v4 r21 doing in build.gradle:

compile("com.blahblah:blah:123") {     exclude group: 'com.android.support', module:'support-v4' } 

you can add exclude libraries, remove one-by-one until figure out 1 pulling in support-v4 , giving error. , leave exclude on one.


there new bug filed here: https://code.google.com/p/android/issues/detail?id=72430

assuming using support repository, workaround comment or remove line

<version>21.0.0-rc1</version> 

in local maven repo listing file @ <android-sdk>/extras/android/m2repository/com/android/support-v4/maven-metadata.xml


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -