gpt4 book ai didi

android - 在 Android Studio 中使用 Gradle 添加编译时出现重复文件

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:32:40 27 4
gpt4 key购买 nike

<分区>

我正在尝试将 Jackson 添加到我的 Android Studio 项目中,我通过将其添加到 gradle 中的依赖项来实现:

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:19.+'
compile 'com.android.support:support-v4:19.+'
compile files('libs/universal-image-loader-1.9.2.jar')
compile 'com.google.android.gms:play-services:+'
compile 'com.fasterxml.jackson.core:jackson-databind:2.4.3'
}

Gradle 构建运行良好,但是当我想在 Android Studio 中运行测试时,出现以下错误:

Error:Gradle: duplicate files during packaging of APK .../app/build/outputs/apk/app-debug-unaligned.apk

Error:Gradle: Execution failed for task ':app:packageDebug'.

Duplicate files copied in APK META-INF/LICENSE File 1: .../.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-annotations/2.4.3/a30ec6f59b6d31b2df06fa73925fda2fc7e84486/jackson-annotations-2.4.3.jar File 2: .../.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-annotations/2.4.3/a30ec6f59b6d31b2df06fa73925fda2fc7e84486/jackson-annotations-2.4.3.jar

我曾尝试在 Android Studio 中使缓存失效,但它不起作用。有人可以帮帮我吗?

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