小编Jos*_*nez的帖子

如何修复在与操作系统无关的路径“build-data.properties”中找到多个文件

添加对“androidx.security:security-crypto:1.0.0-alpha02”的依赖项后,我收到错误消息“在与操作系统无关的路径‘build-data.properties’中发现了多个文件。” 我尝试通过更改库的版本(1.1.0-alpha01;1.0.0-alpha02;1.0.0-alpha01)并修改我在网上找到的 packageoptions 部分来纠正它,但没有任何效果。感谢您的帮助。

apply plugin: 'com.android.application'

android {
compileSdkVersion 30
buildToolsVersion "30.0.1"

defaultConfig {
    applicationId "com.skcc.myapp"
    minSdkVersion 28
    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'
        debuggable false
    }
}

packagingOptions {
    exclude 'META-INF/DEPENDENCIES'
    exclude 'META-INF/NOTICE'
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/NOTICE.txt'
}

}

dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'com.google.android.gms:play-services-vision:11.8.0'
implementation "androidx.security:security-crypto:1.0.0-alpha02"


//
}
Run Code Online (Sandbox Code Playgroud)

dependencies android gradle android-studio build.gradle

13
推荐指数
1
解决办法
1万
查看次数