4
votes

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

Manifest merger failed : uses-sdk:minSdkVersion 9 cannot be smaller than version 14 declared in library [com.google.android.gms:play-services:11.0.4] C:\Users\hp elitebook\Desktop\voiceTranslator\app\build\intermediates\exploded-aar\com.google.android.gms\play-services\11.0.4\AndroidManifest.xml Suggestion: use tools:overrideLibrary="com.google.android.gms.play_services" to force usage

apply plugin: 'com.android.application'

android {
    compileSdkVersion 17
    buildToolsVersion "26.0.2"

    defaultConfig {
        applicationId "com.shaker.voicetranslator"
        minSdkVersion 9
        targetSdkVersion 17
    }

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

dependencies {
    compile 'com.android.support:appcompat-v7:18.0.0'
    compile 'com.google.android.gms:play-services:+'
1
Import only the part of the play-services- you need. Nobody needs all of itTim

1 Answers

3
votes

You are using

compile 'com.google.android.gms:play-services:+'

This library in your SDK Manager is resolved with com.google.android.gms:play-services:11.0.4 (pay attention if you want to use the latest version you have to add the google maven repo).
This dependency has a minSdk =14 and you can't use a minSdk=9.

You have to change

minSdkVersion 9

with

minSdkVersion 14

Also, since you will have a dependency with the latest support libraries you have to change the API used to compile. Use:

compileSdkVersion 26