0

My android application is showing the following error message while I'm trying to install it on real device.

com.android.builder.dexing.DexArchiveBuilderException: com.android.builder.dexing.DexArchiveBuilderException: Failed to process C:\Users\username.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-annotations\2.10.1\54d72475c0d6819f2d0e9a09d25c3ed876a4972f\jackson-annotations-2.10.1.jar

Initially it gives the same error when I was using Java 1.8 on my machine. Some solution says that java version is making complications with my project. Because my project is build using Java 1.7. So I uninstalled Java 1.8 and installed 1.7. Still same error is occuring. Please help me to solve this issue. Below I am mentioning my dependencies.

apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    defaultConfig {
        ...
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    buildToolsVersion '27.0.3'
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }
    productFlavors {
    }
}

dependencies {
    api fileTree(include: ['*.jar'], dir: 'libs')
        androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
            exclude group: 'com.android.support', module: 'support-annotations'
        })
    api 'com.opentok.android:opentok-android-sdk:2.14.+'
    api 'pub.devrel:easypermissions:0.4.0'
    api 'com.android.support:appcompat-v7:27.1.1'
    api 'com.android.support.constraint:constraint-layout:1.0.2'
    api 'com.android.volley:volley:1.1.0'
    api 'com.tokbox:opentok-server-sdk:2.3.1'
    api 'com.android.support:design:27.1.1'
    api 'com.android.support:multidex:1.0.3'
    api 'com.google.firebase:firebase-database:11.8.0'
    api 'com.github.rasoulmiri:buttonloading:v1.0.8'
    api 'com.github.StevenDXC:DxLoadingButton:2.1'
    api project(path: ':library')

    // https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-annotations
    api group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.10.1'

}

apply plugin: 'com.google.gms.google-services'
Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
deluxan
  • 372
  • 1
  • 5
  • 22

1 Answers1

0
 Using this code build gradle 



apply plugin: 'com.android.application'

android {
compileSdkVersion 27
defaultConfig {
    ...
    multiDexEnabled true
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard- 
rules.pro'
    }
}
buildToolsVersion '27.0.3'
compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}
productFlavors {
}
 }

     dependencies {
     api fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    api 'com.opentok.android:opentok-android-sdk:2.14.+'
   api 'pub.devrel:easypermissions:0.4.0'
api 'com.android.support:appcompat-v7:27.1.1'
api 'com.android.support.constraint:constraint-layout:1.0.2'
api 'com.android.volley:volley:1.1.0'
api 'com.tokbox:opentok-server-sdk:2.3.1'
api 'com.android.support:design:27.1.1'
api 'com.android.support:multidex:1.0.3'
api 'com.google.firebase:firebase-database:11.8.0'
api 'com.github.rasoulmiri:buttonloading:v1.0.8'
api 'com.github.StevenDXC:DxLoadingButton:2.1'
api project(path: ':library')


}

  apply plugin: 'com.google.gms.google-services'
Sunil Tale
  • 37
  • 1
  • 4
  • What are you trying to say? I need to change the Java version? – deluxan Dec 17 '19 at 08:17
  • I tried with your code. This time I'm having different error `Exception in thread "main" java.lang.IllegalArgumentException: Type without superclass: module-info` – deluxan Dec 17 '19 at 09:22