首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Error:com.android.builder.dexing.DexArchiveBuilderException:未能处理...\.gradle\caches\modules-2\files-2.1\javaee\javaee-api\5\

Error:com.android.builder.dexing.DexArchiveBuilderException:未能处理...\.gradle\caches\modules-2\files-2.1\javaee\javaee-api\5\
EN

Stack Overflow用户
提问于 2019-04-28 10:50:40
回答 1查看 1.2K关注 0票数 0

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

代码语言:javascript
复制
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文件:

代码语言:javascript
复制
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"
}

我清理,重建,失效缓存和重新启动,但没有帮助.

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

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-04-28 13:32:45

这种形式的问题是关于依赖项中的重复类,为了解决这个问题,只需将这段代码放在build.gradle中:

代码语言:javascript
复制
configurations {
    all*.exclude group: 'javaee', module: 'javaee-api'
}
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/55889508

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档