6
votes

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.

2
Your app must support minsdkversion = 7?Phuc Tran
@ Yeah IO. Yah.. That i can not change. That is the main issue.Smeet
Google play service requires min sdk version = 9. This means if you use it and your app supports min version = 7, some thing will not work.Phuc Tran
Yes correct. No matter if something is not supported but does not build at least. Even i use overrideLibrary in manifast.xmlSmeet
Can you post your gradle file?Phuc Tran

2 Answers

9
votes

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.

1
votes

Update your build.gradle with this minSdkVersion 14

defaultConfig {
    applicationId "com.sample.myapp"
    minSdkVersion 14
    targetSdkVersion 23
    versionCode 3
    versionName "1.2"
}