0

I am trying to learn android in android studio.Now i imported an eclipse project in android studio and now while trying to run it it is not building.Some problems in gradle may be..

Error:Execution failed for task ':app:processDebugManifest'.

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

my build.gradle

apply plugin: 'android'

android { compileSdkVersion 19 buildToolsVersion "19.1.0"

defaultConfig {
    applicationId "com.example.practise"
    minSdkVersion 8
    targetSdkVersion 19
}

buildTypes {
    release {
        runProguard false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
    }
}
}

dependencies {
compile 'com.android.support:support-v4:+'
compile 'com.android.support:gridlayout-v7:+'
}

Can anyone help me to find out the problem??

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491

3 Answers3

1

Change your dependencies

dependencies {
 compile 'com.android.support:support-v4:19.1.0'
 compile 'com.android.support:gridlayout-v7:19.1.0'
}

Using the +, you are getting the last release.

Currently the last release is the compile 'com.android.support:support-v4:21 and it has a minSdk='L' because it is a preview release.

Use it only to test the android 'L' preview.

Gabriele Mariotti
  • 320,139
  • 94
  • 887
  • 841
  • do u have account [http://commonsware.com/] @Gabriele Mariotti..i need the latest version of busy coders guide but its not free.I don't have that much money..can u give it to me if u can??Because my android studio learning is haulted..It would be great for me if i get the book.. –  Sep 13 '14 at 05:00
  • I suggest you contacting the author, explaining your case. – Gabriele Mariotti Sep 13 '14 at 08:09
  • i have tried to contact..do u have account there??can u do something for me?? –  Sep 13 '14 at 08:44
0

Try editing the following line to your Android Manifest file, like so:

dependencies {
    compile 'com.android.support:support-v4:21+' 
}

Then your project should build.

elizzmc
  • 125
  • 9
  • it is not working..actually i am not cleared by your answer..i am editing my question.. –  Sep 12 '14 at 18:06
  • Thanks for sharing your manifest file. Try updated the dependencies, like I stated above. – elizzmc Sep 12 '14 at 18:26
  • Error:A problem occurred configuring project ':app'. > Could not resolve all dependencies for configuration ':app:_debugCompile'. > Could not find com.android.support:support-v4:21.0.0. Required by: practise:app:unspecified This error occurred... –  Sep 12 '14 at 19:12
  • http://stackoverflow.com/questions/24436678/manifest-merger-failed-uses-sdkminsdkversion-10-cannot-be-smaller-than-versio – elizzmc Sep 12 '14 at 19:52
  • do u have account [http://commonsware.com/] @EmC..i need the latest version of busy coders guide but its not free.I don't have that much money..can u give it to me if u can??Because my android studio learning is haulted..It would be great for me if i get the book.. –  Sep 13 '14 at 04:59
0

Change your dependencies in app/build.gradle to lower version

apply plugin: 'com.android.application'

android {
compileSdkVersion 20
buildToolsVersion "20.0.0"

defaultConfig {
    applicationId "com.eusecom.snowsmsden"
    minSdkVersion 16
    targetSdkVersion 20
}

buildTypes {
    release {
        runProguard false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
    }
}
}

dependencies {
compile 'com.android.support:support-v4:20.+'
compile 'com.android.support:appcompat-v7:20.+'
}
eurosecom
  • 2,932
  • 4
  • 24
  • 38
  • do u have account [http://commonsware.com/] @eurosecom..i need the latest version of busy coders guide but its not free.I don't have that much money..can u give it to me if u can??Because my android studio learning is haulted..It would be great for me if i get the book.. –  Sep 13 '14 at 04:59