Android Studio 3.0 DexArchiveBuilderException

前端 未结 6 2091
情话喂你
情话喂你 2020-12-03 05:31

I\'m having this error whilst compiling Instrumentation tests.

Error:com.android.builder.dexing.DexArchiveBuilderException: Failed to process /Users/rafa

相关标签:
6条回答
  • 2020-12-03 05:40

    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
    
    0 讨论(0)
  • 2020-12-03 05:46

    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"
    
    0 讨论(0)
  • 2020-12-03 05:49

    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

    0 讨论(0)
  • 2020-12-03 05:49

    add these line to your gradle:

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    
    0 讨论(0)
  • 2020-12-03 05:55

    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).

    0 讨论(0)
  • 2020-12-03 06:01

    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.

    0 讨论(0)
提交回复
热议问题