i have my project which has package for example com.example.something and I'm adding gradle lib project to my project which i know has the same package. i try compile (project(':plugin-android:app')) { exclude group: 'com.example.something' } but it gives error: com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry:
is there anyway to add the lib project while excluding that package and all the java classes under it ?
this is the lib project gradle
    apply plugin: 'com.android.library'
android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"
    defaultConfig {
        minSdkVersion 11
        targetSdkVersion 23
        compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_7
            targetCompatibility JavaVersion.VERSION_1_7
        }
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}
dependencies {
    compile 'com.android.support:appcompat-v7:23.+' }
and this is example of my project gradle
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.3.1'
    }
}
apply plugin: 'com.android.application'
android {
    compileSdkVersion 'Google Inc.:Google APIs:23'
    buildToolsVersion "23.0.3"
    useLibrary 'org.apache.http.legacy'
    defaultConfig {
        applicationId "xxx.xxxx.xxxx"
        minSdkVersion 11
        targetSdkVersion 23
        multiDexEnabled true
        ndk {
            moduleName "xxxxx-xxx"
        }
    }
    dexOptions {
        javaMaxHeapSize "2g"
        preDexLibraries true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard.cfg'), 'proguard-rules.txt'
        }
        debug {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard.cfg'), 'proguard-rules.txt'
        }
        debug {
            jniDebuggable true
            debuggable true
        }
    }
    productFlavors {
        emulator {
        }
        player {
        }
    }
    sourceSets {
        main {
            jni {
            }
        }
        emulator {
        }
        player {
        }
    }
}
dependencies {
    compile "com.google.android.gms:play-services:8.1.0"
    compile 'com.android.support:multidex:1.0.0'
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.android.support:design:23.0.1'
    compile fileTree(dir: 'src/main/libs', include: ['*.jar'])
    compile (project(':plugin-imagecode-android:app')) {
        //trying to exclude package com.example.something from the lib project
    }
}
 
     
    