如何从jar文件中删除单个程序包。如何从gradle中的jar文件中删除单个模块Android Studio
我从diffent厂商的两台SDK的和两个SDK的有google.gson包含在jar文件包,因为这引起了我的问题,运行在Android Studio中构建它显示的错误下面
像我知道如何从存储库这样排除模块:
compile('com.android.support:design:23.1.1') {
exclude module: 'support-v4'
}
但我不知道如何从我的应用程序中需要的jar文件中排除一些包。任何帮助,将不胜感激。
MY摇篮FILE:
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'libs/SDK/com.google.gson'
}
defaultConfig {
applicationId "**********"
minSdkVersion 16
targetSdkVersion 21
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
debuggable true
}
}
dexOptions {
preDexLibraries = false
javaMaxHeapSize "4g"
}
}
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
compile('com.facebook.android:facebook-android-sdk:4.1.0') {
exclude module: 'support-v4'
}
compile('org.twitter4j:twitter4j-core:4.0.2') {
exclude module: 'support-v4'
}
compile('com.android.support:design:22.2.0') {
exclude module: 'support-v4'
}
compile files('libs/FlurryAnalytics-5.3.0.jar')
compile files('libs/gcm.jar')
compile('com.android.support:design:23.1.1') {
exclude module: 'support-v4'
}
compile files('libs/SDK.jar')
compile project(':volley')
compile project(':viewPagerIndicator')
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.squareup.picasso:picasso:2.5.0'
compile 'pl.droidsonroids.gif:android-gif-drawable:1.1.+'
compile 'com.android.support:support-v4:23.1.0'
compile project(':android-country-picker-master')
compile 'com.google.code.gson:gson:2.2.4'
compile 'javax.annotation:javax.annotation-api:1.2'
}
发表您的'build.gradle' –
@IntelliJAmiya,我已经发布了文件的gradle再次 – warlock