I got this error while loading Android studio

时间:2017-06-15 09:45:07

标签: android

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

Manifest merger failed : uses-sdk:minSdkVersion 9 cannot be smaller than version 14 declared in library [com.android.support:design:26.0.0-alpha1] /home/dinesh/.android/build-cache/5b4541f0362f0c186bfecf0c7160b9688c35a715/output/AndroidManifest.xml
    Suggestion: use tools:overrideLibrary="android.support.design" to force usage

3 个答案:

答案 0 :(得分:0)

It is self explanatory. The library which you are using in your app has min sdk version set to 14.

But in your app you have set it to 9.

Now you need to increase it to minimum 14.

答案 1 :(得分:0)

  • in app/build.gradle, minSdkVersion should not be smaller than 14

答案 2 :(得分:0)

将项目设置为使用SDK版本25.0.0。确保首先在工具>下的Android SDK设置中下载它。 Android> SDK Manager。搜索SDK设置并在SDK工具下查看。确保选中显示包详细信息。

然后将app / build.gradle更改为使用25.0.0代替默认设置,如果您使用向导创建应用程序。 e.g。

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.0"
    defaultConfig {
        applicationId "com.example.adam.myapplication5"
        minSdkVersion 9
        targetSdkVersion 25
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:25.0.0'
    compile 'com.android.support:design:25.0.0'
    compile 'com.android.support:support-vector-drawable:25.0.0'
    testCompile 'junit:junit:4.12'
}

您可以通过文件>更改Sdk版本,buildToolsVersion和targetSdkVersion;项目结构>属性和Flavors选项卡。但我发现需要通过直接编辑build.gradle文件来手动设置编译指令。