Answer the question
In order to leave comments, you need to log in
How to resolve the DexArchiveBuilderException error?
Hello!
I wanted to write a small application using the NFC
SDK - https://www.mifare.net/ru/%D0%BF%D1%80%D0%BE%D0%B4... I
created a small application by analogy with the examples, but with I get an error while building the project:
I tried to solve the problem in the following ways:
1)
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
} }
defaultConfig { multiDexEnabled true }
implementation 'com.google.guava:guava:25.0-android'
Caused by: com.android.builder.dexing.DexArchiveBuilderException: Failed to process C:\Users\Phoenix\IdeaProjects\BakiKart\app\build\intermediates\transforms\instantRunSlicer\debug\3
Caused by: com.android.builder.dexing.DexArchiveBuilderException: Error while dexing.
Caused by: java.lang.ArrayIndexOutOfBoundsException
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:transformClassesWithDexBuilderForDebug'
Caused by: java.lang.RuntimeException: com.android.build.api.transform.TransformException: com.android.builder.dexing.DexArchiveBuilderException: com.android.builder.dexing.DexArchiveBuilderException: Failed to process C:\Users\Phoenix\IdeaProjects\BakiKart\app\build\intermediates\transforms\instantRunSlicer\debug\3
Answer the question
In order to leave comments, you need to log in
In general, it was a bug on the part of the developer.
If someone has a similar error, then a temporary solution:
In app.gradle, you need to downgrade gradle to 3.0.1. (bug occurred in 3.1.4)
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question