Skip to content Skip to sidebar Skip to footer

How To Remove Single Module From The Jar File In Gradle Android Studio

How can i remove the single package from the jar file. I have two SDK's from diffent vendors and both the SDK's have google.gson package included in the jar files, because this ca

Solution 1:

I realize that you did something similar to this but i would like to add that you can use Asterisks, this is just a snippet from an old project:

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile'com.android.support:appcompat-v7:22.2.0'compile'com.android.support:recyclerview-v7:21.0.3'compile'com.android.support:cardview-v7:21.0.3'compile'com.android.support:support-v4:22.2.0'compile('com.google.android.gms:play-services:7.3.0') {
        exclude group: "com/google/android/gms/location/**"
        exclude group: "com/google/android/gms/wearable/**"
        exclude group: "com/google/android/gms/maps/**"
        exclude group: "com/google/android/gms/games/**"
        exclude group: "com/google/android/gms/plus/**"
        exclude group: "com/google/android/gms/drive/**"
        exclude group: "com/google/android/gms/panorama/**"
        exclude group: "com/google/android/gms/wallet/**"
        exclude group: "com/google/android/gms/tagmanager/**"
        exclude group: "com/google/android/gms/fitness/**"
        exclude group: "com/google/android/gms/security/**"
        exclude group: "com/google/android/gms/identity/**"
    }
    compile'com.github.amlcurran.showcaseview:library:5.0.0'
}

Also just to clarify you should be excluding gson from one of the packages since you have a duplicate gson dependency.

exclude module: 'gson';

Post a Comment for "How To Remove Single Module From The Jar File In Gradle Android Studio"