Issue
when I updated my dependencies in Android Studio 3.3.1, I receive this error: Android Studio Version: 3.3.1 Gradle Version: 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
this is my build.gradle file:
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"
}
I clean, rebuild, invalidate cache and restart, but doesn't help...
I saw the questions like this, but those didn't help me. what can I do? anyone help????
Solution
this form of problem is about duplicated classes in dependencies and to solve it, just put this piece of code in build.gradle:
configurations {
all*.exclude group: 'javaee', module: 'javaee-api'
}
Answered By - Mohamad Seyedi
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.