gpt4 book ai didi

android - androidstudio HTTPCore version.properties中的重复文件异常

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

在 android studio 中有一个项目,我在那个项目中使用了几个依赖项,我的 gradle 文件看起来像这样

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

dependencies {
//compile fileTree(include: ['*.jar'], dir: 'libs')
compile project(':FacebookSDK')
compile files('libs/httpclient-4.3.5.jar')
compile files('libs/httpclient-cache-4.3.5.jar')
compile (files('libs/httpcore-4.3.3.jar'))/*{
exclude "org/apache/http/version.properties"
}*/
compile files('libs/httpmime-4.3.5.jar')
compile files('libs/splunk-mint-4.0.7.jar')
compile (files('libs/twitpic4j.jar'))
compile files(('libs/twitter4j-core-4.0.1.jar'))
compile files(('libs/sendgrid-0.1.2-jar.jar'))
//compile files('libs/org.apache.http.legacy.jar')
compile ('oauth.signpost:signpost-commonshttp4:1.2.1.2')
compile ('oauth.signpost:signpost-core:1.2.1.2')
compile 'com.google.code.gson:gson:2.8.0'
compile 'com.google.android.gms:play-services:5.0.89'
//compile 'org.lucee:httpcomponents-httpcore:4.4.4'

}

我遇到异常

Warning:WARNING: Dependency org.apache.httpcomponents:httpclient:4.0.1 is ignored for debug as it may be conflicting with the internal version provided by Android.
Error:java.lang.RuntimeException: com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK org/apache/http/version.properties
Error:com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK org/apache/http/version.properties
Error:com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK org/apache/http/version.properties

我已经浏览了很多问题,但没有一个解决方案对我有用,请帮助我解决这个问题

最佳答案

你得到了

Error:com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK org/apache/http/version.properties Error:com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK org/apache/http/version.properties

您应该启用 packagingOptions

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

并设置multiDexEnabled true然后Clean-Rebuild您的项目并运行

关于android - androidstudio HTTPCore version.properties中的重复文件异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41296523/

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