访问旧应用程序时清单合并失败

时间:2019-09-20 05:40:47

标签: java android android-studio

在更新旧的移动应用程序时出现此错误。

我已经尝试过在渐变器上编辑minimunSDK,但是它没有任何改变。


    Manifest merger failed : uses-sdk:minSdkVersion 14 cannot be smaller than version 15 declared in library [com.facebook.android:account-kit-sdk:4.39.0] C:\Users\Administrator\.gradle\caches\transforms-2\files-2.1\1fd161e35a069ed7796af08ad312a191\account-kit-sdk-4.39.0\AndroidManifest.xml 
            as the library might be using APIs not available in 14

Suggestion: use a compatible library with a minSdk of at most 14,
        or increase this project's minSdk version to at least 15,
        or use tools:overrideLibrary="com.facebook.accountkit" to 
        force usage (may lead to runtime failures)

2 个答案:

答案 0 :(得分:0)

您正在使用的库已将其最小SDK设置为15,但您的应用程序SDK设置为14。转到gradle文件并将您的SDK更新为15。您甚至可以将SDK升级到16,因为只有最稀有的人是使用API​​ 16以下的设备。

答案 1 :(得分:0)

build.gradle(模块)

apply plugin: 'com.android.application'

    android {
    compileSdkVersion 29
    buildToolsVersion "29.0.0"
    defaultConfig {
        applicationId "com.example.myapplication"
        minSdkVersion 14                 <------------------------ Change this greater than 14
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'com.google.android.material:material:1.0.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.2.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}