gpt4 book ai didi

android - Gradle构建错误:输入重复

转载 作者:行者123 更新时间:2023-12-03 06:25:45 25 4
gpt4 key购买 nike

我的gradle文件是

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "24.0.0 rc2"

defaultConfig {
applicationId "com.test.test"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

buildscript {
repositories {
mavenCentral()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
}
}

repositories {
mavenCentral()
jcenter()
flatDir {
dirs '../libs'
}
}



dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.3.0'
compile('com.google.android.gms:play-services:8.4.0') {
exclude group: 'com.google.guava'
}
compile ('org.apache.httpcomponents:httpcore:4.4.4')
{
exclude group: 'org.apache.http.annotation.NotThreadSafe'
}
compile 'commons-io:commons-io:2.4'
compile 'com.android.support:support-annotations:23.0.0'
compile 'com.android.support:recyclerview-v7:23.0.0'
compile 'com.google.android.exoplayer:exoplayer:r1.4.2'
compile 'com.mopub.volley:mopub-volley:1.1.0'
compile 'com.android.support:multidex:1.0.0'
}

而且在编译应用程序时出现此错误

错误:任务':myapplication:transformClassesWithJarMergingForDebug'的执行失败。
com.android.build.api.transform.TransformException:
java.util.zip.ZipException:重复条目:org / apache / http / annotation / NotThreadSafe.class


谁能告诉我我需要从依赖列表中排除的内容。或对此问题有任何解决方案?

最佳答案

如果您还包括其他子项目,请当心。您可以通过在“ proguard-rules.pro ”中添加以下异常来解决此问题:

-dontwarn org.apache.**

关于android - Gradle构建错误:输入重复,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36911101/

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