Error:com.android.builder.dexing.DexArchiveBuilderException: Failed to process guava-21.0.jar Android 3.1 Dev Channel

Related searches

After updating my dependency versions in AndroidStudio3.1, I started getting the following error:

    Information:Gradle tasks [:app:assembleDebug]
Error:com.android.builder.dexing.DexArchiveBuilderException: Failed to process C:\Users\Blabla\.gradle\caches\modules-2\files-2.1\com.google.guava\guava\21.0\3a3d111be1be1b745edfa7d91678a12d7ed38709\guava-21.0.jar
Error:com.android.builder.dexing.DexArchiveBuilderException: Error while dexing.
Error:com.android.tools.r8.ApiLevelException: Default interface methods are only supported starting with Android N (--min-api 24): java.util.Collection com.google.common.collect.BiMap.values()
Error:Execution failed for task ':app:transformClassesWithDexBuilderForDebug'.
> com.android.build.api.transform.TransformException: com.android.builder.dexing.DexArchiveBuilderException: com.android.builder.dexing.DexArchiveBuilderException: Failed to process C:\Users\Blabla\.gradle\caches\modules-2\files-2.1\com.google.guava\guava\21.0\3a3d111be1be1b745edfa7d91678a12d7ed38709\guava-21.0.jar
Information:BUILD FAILED in 6s
Information:4 errors
Information:0 warnings
Information:See complete output in console

I have already cleaned and rebuilt project. Checked my "multiDexEnabled true" and 'compile 'com.android.support:multidex:1.0.2' is added.

What else can I do?

EDIT: Adding build.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    buildToolsVersion '26.0.2'
    defaultConfig {
        applicationId "com.blabla"
        minSdkVersion 19
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    configurations.all {
        resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
    }

}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:27.0.0'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.android.support:multidex:1.0.2'
    compile 'com.android.support:design:27.0.0'
    compile 'com.android.support:cardview-v7:27.0.0'
    compile 'com.jakewharton:butterknife:8.7.0'
    compile 'com.google.code.gson:gson:2.8.0'
    compile 'com.google.guava:guava:21.0'
    compile 'com.microsoft.azure:azure-mobile-android:3.2.0@aar'
    compile 'com.microsoft.azure:notification-hubs-android-sdk:0.4@aar'
    compile 'com.microsoft.azure:azure-notifications-handler:1.0.1@aar'
    compile 'com.squareup.okhttp:okhttp:2.5.0'
    compile 'com.google.firebase:firebase-core:11.4.2'
    compile 'com.google.firebase:firebase-crash:11.4.2'
    compile 'com.google.firebase:firebase-auth:11.4.2'
    compile 'com.google.firebase:firebase-database:11.4.2'
    compile 'com.google.firebase:firebase-storage:11.4.2'
    testCompile 'junit:junit:4.12'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.7.0'
    compile 'com.google.android.gms:play-services-maps:11.4.2'
    compile 'com.google.android.gms:play-services-location:11.4.2'
    compile 'com.google.maps.android:android-maps-utils:0.5+'
}
apply plugin: 'com.google.gms.google-services'

I had the same issue in react-native project,

the below lines worked for me,

compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
} 

Error:com.android.builder.dexing.DexArchiveBuilderException, Error:com.android.builder.dexing.DexArchiveBuilderException: Failed to process guava-21.0.jar Android 3.1 Dev Channel. After updating my� Ensure you are in the package not Android view mode on the file tree on the left side. Press Alt+1 if it is not open. Go to the app\build folder as stated and delete the build folder`.

Update your Guava version

Guava 21 is Java 8 only.

Update your gradle to Guava version 27.0.1-android, which is compatible with Android:

Gradle 4.6+:

dependencies {
  implementation 'com.google.guava:guava:27.0.1-android'
}

Previous Gradle versions:

dependencies {
  compile 'com.google.guava:guava:27.0.1-android'
}

错误:com.Android.builder.dexing , Android.builder.dexing.DexArchiveBuilderException: Failed to process C:\Users\ Blabla\.gradle\caches\module Android.builder.dexing. DexArchiveBuilderException:无法处理guava-21.0.jar Android 3.1 Dev Channel Error:com.Android.builder.dexing.DexArchiveBuilderException: Error while dexing. Error:com. Enable Multidex through build.gradle of your app module. multiDexEnabled true Same as below - android { compileSdkVersion 27 defaultConfig { applicationId "com.xx.xxx" minSdkVersion 15 targetSdkVersion 27 versionCode 1 versionName "1.0" multiDexEnabled true //Add this testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { shrinkResources true

I had same problem and I solved it cleaning project and rebuilding it.

In Android Studio go to Build --> Clean Project and after, Build --> Rebuild Project

Hope it helps

Error: com.Android.builder.dexing , DexArchiveBuilderException: Failed to process C:\Users\Blabl DexArchiveBuilderException: No se pudo procesar guava-21.0.jar Android 3.1 Dev Channel. Erreur: com.android.builder.dexing.DexArchiveBuilderException: Impossible de traiter guava-21.0.jar Android 3.1 Dev Channel Après la mise à jour de ma dépendance versions dans AndroidStudio3.1 j'ai commencé à avoir l'erreur suivante:

I had the similar case when I switched to OkHttp 4.x. It turned out that I had to disable the method profiling in run configuration: Edit Configurations -> app -> Profiling tab -> uncheck Enable advanced profiling. It solved my case but I cannot use profiling now on older devices.

Error:com.android.builder.dexing.DexArchiveBuilderException, dexing.DexArchiveBuilderException: Failed to process guava-21.0.jar Android 3.1 Dev Channel. After updating my dependency versions in� actualización de la versión de guayaba. guayaba 21 es Java 8 solamente. actualización de su versión Gradle en Guava 23.3-android, que es compatible con Android:

In my case, I was getting the error because I was clicking the Debug 'app' button while my build variant was set to release. When I changed my build variant to debug, then clicked the Debug button again, the error went away. I hope this helps someone.

android - 错误:com.android.builder.dexing , android - 错误:com.android.builder.dexing.DexArchiveBuilderException:无法处理guava-21.0.jar Android 3.1 Dev Channel. 原文 标签 android android-gradle� 오류:com.android.builder.dexing.DexArchiveBuilderException:처리 실패 guava-21.0.jar Android 3.1 Dev Channel (3) 구아바 버전 업데이트 Guava 21은 Java 8에서만 사용할 수 있습니다.

오류:com.android.builder.dexing.DexArchiveBuilderException:처리 실패 guava-21.0.jar Android 3.1 Dev Channel (3) 구아바 버전 업데이트 Guava 21은 Java 8에서만 사용할 수 있습니다.

Thank you for new version of library. Project doesn't build in Android Studio 3.1 and show Java compiler error: Caused by: com.android.builder.dexing.DexArchiveBuilderException: Failed to proce

Comments
  • Just after posting this, I tried to go back to 'com.google.guava:guava:20.0' and it works that way. Only when I update to 21.0 it gives the error.
  • post your gradle
  • show your build.gradle
  • added the build.gradle
  • Guava 21.0 requires Java 8. Guava 21.0 probably not compatible
  • This should be the correct answer. The error is related with a dependency that is on a higher version of java of the one you are trying to use. So compile your project with newest version, not the other way around and add messy configuration to your project.
  • I couldn't use this because I wasn't in a position where I could append this to the compile task because I didn't have direct access to it. This worked for me instead.
  • Where in which file should this be added?
  • Figured it out, and it works, thanks. You make the changes here: build.gradle (Module: app) and then within the android property.
  • This only leads to a NullPointerException when building.
  • That's it. But I also had to add the following to solve another error after adding your dependency: android { configurations.all { resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9' } }
  • @Atak where did u added this ??