Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

uses-sdk:minSdkVersion 7 cannot be smaller than version 9 declared in library

I am using Android Studio Version 1.2.2.

My project's min sdk is 7 and I want to use google play service which requires min sdk 9 and above. So I use the below to overrideLibrary the library.

Although I am getting the below error:

Error:Execution failed for task ':processDebugManifest'.

Manifest merger failed : uses-sdk:minSdkVersion 7 cannot be smaller than version 9 declared in library D:\project_name\build\intermediates\exploded-aar\com.google.android.gms\play-services-ads\7.5.0\AndroidManifest.xml Suggestion: use tools:overrideLibrary="com.google.android.gms.ads" to force usage

I stuck at this point and can not go ahead. Any help is highly appreciated.

like image 302
Smeet Avatar asked Jun 22 '15 09:06

Smeet


2 Answers

You just need to update your minSdkVersion 7 to minSdkVersion 9 in your gradle file.

Its just mean that your application must not have minSdkVersion (minimum SDK version) lesser then the library minSdkVersion.

update your gradle file and build project again.

like image 77
SilentKiller Avatar answered Nov 03 '22 08:11

SilentKiller


Update your build.gradle with this minSdkVersion 14

defaultConfig {
    applicationId "com.sample.myapp"
    minSdkVersion 14
    targetSdkVersion 23
    versionCode 3
    versionName "1.2"
}
like image 1
shihabkv Avatar answered Nov 03 '22 09:11

shihabkv