清单合并失败:使用-sdk:minsdkversion 16 不能小于库中声明的版本19

ryevplcw  于 2021-07-03  发布在  Java
关注(0)|答案(1)|浏览(396)

我在实现文件选择器库时出现了这个错误这里是 build.gradle 文件:

apply plugin: 'com.android.application'

    android {
        compileSdkVersion 30
        buildToolsVersion "30.0.2"

        defaultConfig {
            applicationId "com.example.myapplication"
            minSdkVersion 16
            targetSdkVersion 30
            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.2.0'
        implementation 'androidx.constraintlayout:constraintlayout:2.0.2'
        implementation 'ir.samanjafari.easycountdowntimer:easycountdowntimer:2.5.0'
        //implementation 'com.droidninja:filepicker:2.2.5'
    //    implementation 'com.github.jaiselrahman:FilePicker:1.3.2'
        implementation 'com.nbsp:materialfilepicker:1.9.1'
        testImplementation 'junit:junit:4.12'
        androidTestImplementation 'androidx.test.ext:junit:1.1.2'
        androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
    }

这是图书馆 implementation 'com.nbsp:materialfilepicker:1.9.1' 我该怎么修?

hs1ihplo

hs1ihplo1#

您使用的库至少支持sdk版本19,而您的应用程序至少支持16。这就是它失败的原因。
您可以在以下行中将minsdk版本更新为19:

minSdkVersion 19

或者您可以使用另一个具有相同特性的库,该库至少支持16个sdk

相关问题