Category Archives: StackOverFlow

Stack Overflow is a question and answer site for professional and enthusiast programmers.

Error while inserting Jar File in Android Studio

I am adding jar file of realm to my android project and its giving this error:

Error:Execution failed for task ':app:packageAllDebugClassesForMultiDex'.
  java.util.zip.ZipException: duplicate entry: io/realm/DefaultRealmModule.class

My Gradle File:

apply plugin: 'com.android.library'

android {
    signingConfigs {
    }
    compileSdkVersion 19
    buildToolsVersion "22.0.1"
    defaultConfig {
        minSdkVersion 11
        targetSdkVersion 19
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }
}

dependencies {
    compile 'com.j256.ormlite:ormlite-android:4.48'
    compile 'com.j256.ormlite:ormlite-core:4.48'
    compile files('libs/fat.jar')
    compile files('libs/lifesense_ble_v3.2.3.jar')

    compile 'com.google.android.gms:play-services:4.2.42'
    compile 'com.google.code.gson:gson:2.3.1'
    compile files('libs/realm-0.82.2.jar')
}

read more

Error while inserting Jar File in Android Studio

I am adding jar file of realm to my android project and its giving this error:

Error:Execution failed for task ':app:packageAllDebugClassesForMultiDex'.
  java.util.zip.ZipException: duplicate entry: io/realm/DefaultRealmModule.class

My Gradle File:

apply plugin: 'com.android.library'

android {
    signingConfigs {
    }
    compileSdkVersion 19
    buildToolsVersion "22.0.1"
    defaultConfig {
        minSdkVersion 11
        targetSdkVersion 19
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }
}

dependencies {
    compile 'com.j256.ormlite:ormlite-android:4.48'
    compile 'com.j256.ormlite:ormlite-core:4.48'
    compile files('libs/fat.jar')
    compile files('libs/lifesense_ble_v3.2.3.jar')

    compile 'com.google.android.gms:play-services:4.2.42'
    compile 'com.google.code.gson:gson:2.3.1'
    compile files('libs/realm-0.82.2.jar')
}

read more

Error while inserting Jar File in Android Studio

I am adding jar file of realm to my android project and its giving this error:

Error:Execution failed for task ':app:packageAllDebugClassesForMultiDex'.
  java.util.zip.ZipException: duplicate entry: io/realm/DefaultRealmModule.class

My Gradle File:

apply plugin: 'com.android.library'

android {
    signingConfigs {
    }
    compileSdkVersion 19
    buildToolsVersion "22.0.1"
    defaultConfig {
        minSdkVersion 11
        targetSdkVersion 19
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }
}

dependencies {
    compile 'com.j256.ormlite:ormlite-android:4.48'
    compile 'com.j256.ormlite:ormlite-core:4.48'
    compile files('libs/fat.jar')
    compile files('libs/lifesense_ble_v3.2.3.jar')

    compile 'com.google.android.gms:play-services:4.2.42'
    compile 'com.google.code.gson:gson:2.3.1'
    compile files('libs/realm-0.82.2.jar')
}

read more

Error while inserting Jar File in Android Studio

I am adding jar file of realm to my android project and its giving this error:

Error:Execution failed for task ':app:packageAllDebugClassesForMultiDex'.
  java.util.zip.ZipException: duplicate entry: io/realm/DefaultRealmModule.class

My Gradle File:

apply plugin: 'com.android.library'

android {
    signingConfigs {
    }
    compileSdkVersion 19
    buildToolsVersion "22.0.1"
    defaultConfig {
        minSdkVersion 11
        targetSdkVersion 19
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }
}

dependencies {
    compile 'com.j256.ormlite:ormlite-android:4.48'
    compile 'com.j256.ormlite:ormlite-core:4.48'
    compile files('libs/fat.jar')
    compile files('libs/lifesense_ble_v3.2.3.jar')

    compile 'com.google.android.gms:play-services:4.2.42'
    compile 'com.google.code.gson:gson:2.3.1'
    compile files('libs/realm-0.82.2.jar')
}

read more

Error while inserting Jar File in Android Studio

I am adding jar file of realm to my android project and its giving this error:

Error:Execution failed for task ':app:packageAllDebugClassesForMultiDex'.
  java.util.zip.ZipException: duplicate entry: io/realm/DefaultRealmModule.class

My Gradle File:

apply plugin: 'com.android.library'

android {
    signingConfigs {
    }
    compileSdkVersion 19
    buildToolsVersion "22.0.1"
    defaultConfig {
        minSdkVersion 11
        targetSdkVersion 19
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }
}

dependencies {
    compile 'com.j256.ormlite:ormlite-android:4.48'
    compile 'com.j256.ormlite:ormlite-core:4.48'
    compile files('libs/fat.jar')
    compile files('libs/lifesense_ble_v3.2.3.jar')

    compile 'com.google.android.gms:play-services:4.2.42'
    compile 'com.google.code.gson:gson:2.3.1'
    compile files('libs/realm-0.82.2.jar')
}

read more