gpt4 book ai didi

java - 错误 :com. android.builder.dexing.DexArchiveBuilderException : Failed to process . ..\.gradle\caches\modules-2\files-2.1\javaee\javaee-api\5\

转载 作者:行者123 更新时间:2023-12-02 06:13:32 26 4
gpt4 key购买 nike

当我在 Android Studio 3.3.1 中更新依赖项时,收到以下错误:Android Studio版本:3.3.1 Gradle 版本:5.4

Caused by: com.android.builder.dexing.DexArchiveBuilderException: Failed to process C:\Users\Mohamad\.gradle\caches\modules-2\files-2.1\javaee\javaee-api\5\e3cc17b10ab552219edbe33915e62937e387d0ef\javaee-api-5.jar

这是我的 build.gradle 文件:

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'com.google.gms.google-services'


configurations {
implementation.exclude group: "org.apache.httpcomponents", module: "httpclient"
}

android {
compileSdkVersion 28
buildToolsVersion "29.0.0-rc2"

defaultConfig {
applicationId "xxx.xxx.xxx"
minSdkVersion 17
targetSdkVersion 28
versionCode 10
versionName "3.1.1"
multiDexEnabled true

}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

defaultConfig {
resConfigs "en"
}

packagingOptions {
exclude 'META-INF/LICENSE'
}

dexOptions {
jumboMode = true
javaMaxHeapSize "4g"
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "androidx.appcompat:appcompat:1.0.2"
implementation "com.google.android.material:material:1.1.0-alpha05"
implementation "androidx.percentlayout:percentlayout:1.0.0"
implementation "androidx.cardview:cardview:1.0.0"
implementation 'androidx.multidex:multidex:2.0.1'
implementation "androidx.recyclerview:recyclerview:1.1.0-alpha05"
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.squareup.okhttp3:okhttp:3.14.1'
implementation 'jp.wasabeef:picasso-transformations:2.2.1'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.google.http-client:google-http-client-android:1.20.0'
implementation 'com.google.api-client:google-api-client-android:1.20.0'
implementation 'com.google.api-client:google-api-client-gson:1.20.0'
implementation 'com.google.android.gms:play-services-analytics:16.0.8'
implementation 'com.r0adkll:slidableactivity:2.0.5'
implementation 'com.mikepenz:fontawesome-typeface:5.3.1.1'
implementation 'com.mikepenz:material-design-iconic-typeface:2.2.0.4'
implementation 'com.mikepenz:google-material-typeface:3.0.1.2.original'
implementation 'com.mikepenz:actionitembadge:3.3.2@aar'
implementation 'com.mikepenz:iconics-core:3.2.5@aar'
implementation 'com.mikepenz:iconics-views:3.2.5@aar'
implementation 'com.snappydb:snappydb-lib:0.5.2'
implementation 'com.esotericsoftware.kryo:kryo:2.24.0'
implementation 'io.jsonwebtoken:jjwt:0.7.0'
implementation 'za.co.riggaroo:materialhelptutorial:1.2.0'
implementation 'net.hockeyapp.android:HockeySDK:5.1.1'
implementation 'com.ibm.icu:icu4j:64.2'
implementation 'org.piwik.sdk:piwik-sdk:3.0.2'
implementation 'org.piwik.java.tracking:piwik-java-tracker:1.2'
implementation project(':persianmaterialdatetimepicker')
implementation project(':fullscreendialog')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}

我清理、重建、使缓存无效并重新启动,但没有帮助...

我看到了这样的问题,但这些对我没有帮助。我能做些什么?有人帮忙吗???

最佳答案

这种形式的问题与依赖项中的重复类有关,要解决它,只需将这段代码放入 build.gradle 中即可:

configurations {
all*.exclude group: 'javaee', module: 'javaee-api'
}

关于java - 错误 :com. android.builder.dexing.DexArchiveBuilderException : Failed to process . ..\.gradle\caches\modules-2\files-2.1\javaee\javaee-api\5\,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55889508/

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