gpt4 book ai didi

android - 打包时重复文件

转载 作者:行者123 更新时间:2023-11-30 00:27:02 26 4
gpt4 key购买 nike

我无法将管添加到我要缓存的库错误,我该如何解决?

错误:任务 ':app:transformResourcesWithMergeJavaResForDebug' 执行失败。

com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK builddef.lst File1: C:\Users\Sims2.gradle\caches\modules-2\files-2.1\com.googlecode.mp4parser\isoparser\1.1.20\44b7ee9785227a29db4048ee36758ffa553b749e\isoparser-1.1.20.jar File2: C:\Users\Sims2.android\build-cache\ac4f8b61ef7112ca250eee2e786463e96f1ea27c\output\jars\classes.jar

    apply plugin: 'com.android.application'

android {
compileSdkVersion 26
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "*******"
minSdkVersion 19
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
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.3.1'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:support-vector-drawable:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'jp.wasabeef:recyclerview-animators:2.2.3'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.hanks:htextview-rainbow:0.1.1'
compile 'com.hanks:htextview-typer:0.1.1'
compile 'com.google.firebase:firebase-ads:11.0.0'
compile 'com.scottyab:aescrypt:0.0.1'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'jp.wasabeef:glide-transformations:2.0.2'
compile 'com.squareup.picasso:picasso:2.5.1'
compile 'cn.pedant.sweetalert:library:1.3'
compile 'life.knowledge4:k4l-video-trimmer:1.0'
compile 'com.iceteck.silicompressorr:silicompressor:2.0'
testCompile 'junit:junit:4.12'
}

最佳答案

只需将 packagingOptions { exclude 'builddef.lst' } 添加到您的 gradle 文件中 - 这应该足够了。

完整版:

android {
compileSdkVersion 26
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "*******"
minSdkVersion 19
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'builddef.lst'
}
}

关于android - 打包时重复文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45152563/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com