I\'m having this error whilst compiling Instrumentation tests.
Error:com.android.builder.dexing.DexArchiveBuilderException: Failed to process /Users/rafa
With latest android studio 3.2 and gradle, we can also resolve it via
implementation 'com.android.support:multidex:1.0.3' in app build.gradle
I just have the same error for me, it was because of okhttp and I downgrade implementation of it form:
to this:
implementation "com.squareup.okhttp3:okhttp:3.12.1"
In gradle.properties
add android.enableD8=true
This should work.
Please note that there is a known bug when you export and upload the apk to play store with d8 enable. The app will not run on some devices when downloaded from play store.
https://issuetracker.google.com/issues/64740479
add these line to your gradle:
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
I have had the same issue and I resolved it by disabling the advanced profiling in run configuration.
Edit Configurations -> app -> Profiling -> Enable advanced profiling (Uncheck this option).
If you're using guava, tou can try to upgrade it to the latest android-specific build
implementation 'com.google.guava:guava:23.0-android'
This fixed the error for me when I was using the non-android guava build.