O
O
Orkhan Hasanli2018-08-21 20:14:58
android studio
Orkhan Hasanli, 2018-08-21 20:14:58

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
    } }

2) defaultConfig { multiDexEnabled true }
3)
implementation 'com.google.guava:guava:25.0-android'

4) implementation 'com.android.support:multidex:1.0.3'
5) Clear project and Rebuild project
6) Deleting debug directory
Log:
Log
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

Who met with a similar problem and how it was overcome? Thanks in advance for any help.
Screen:
5b7c47fb1f087050627239.jpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Orkhan Hasanli, 2018-08-21
@azerphoenix

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 question

Ask a Question

731 491 924 answers to any question