Java Android Studio构建失败重复条目:com/google/thirdparty/publicsuffix/PublicSuffixPatterns.class
当我试图生成应用程序APK时,出现了以下错误 错误:任务“:app:transformClassesWithJarMergingForRelease”的执行失败。 com.android.build.api.transform.TransformException:java.util.zip.zipeException:重复条目:com/google/thirdparty/publicsuffix/PublicSuffixPatterns.class 它出现在我添加“multiDexEnabled true”之后 到我的gradle档案。但这是必要的 有人能帮我吗 gradle文件包含以下内容:Java Android Studio构建失败重复条目:com/google/thirdparty/publicsuffix/PublicSuffixPatterns.class,java,android,gradle,duplicates,Java,Android,Gradle,Duplicates,当我试图生成应用程序APK时,出现了以下错误 错误:任务“:app:transformClassesWithJarMergingForRelease”的执行失败。 com.android.build.api.transform.TransformException:java.util.zip.zipeException:重复条目:com/google/thirdparty/publicsuffix/PublicSuffixPatterns.class 它出现在我添加“multiDexEnable
apply plugin: 'com.android.application'
apply plugin: 'me.tatarka.retrolambda'
android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
lintOptions{
checkReleaseBuilds false
}
defaultConfig {
applicationId "pl.nowakprojects.socialmafia"
minSdkVersion 19
targetSdkVersion 25
versionCode 1
versionName "0.1"
multiDexEnabled true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
buildTypes.each {
it.buildConfigField 'boolean', 'PREMIUM_VERSION', PremiumVersionBoolean
}
}
ext {
JUNIT_VERSION = '4.12'
DAGGER_VERSION = '2.4'
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'org.parceler:parceler:1.1.5'
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.android.support:design:25.1.0'
compile 'com.android.support:cardview-v7:25.1.0'
compile 'com.android.support:recyclerview-v7:25.1.0'
compile 'com.android.support:support-v4:25.1.0'
compile 'org.parceler:parceler-api:1.1.5' //Parceler - przenoszenie obiektow miedzy Activity
compile 'com.jakewharton:butterknife:8.4.0' //ButterKnife
compile 'com.jakewharton:butterknife-compiler:8.4.0'
compile 'com.afollestad.material-dialogs:core:0.9.0.2'
compile 'org.greenrobot:eventbus:3.0.0' //EventBus
compile 'me.tankery.lib:circularSeekBar:1.1.3' //SeekBar
// compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha8'
//compile 'com.android.support.constraint:constraint-layout:1.0.0-beta3'
compile 'com.annimon:stream:1.1.4'
//compile "com.google.auto.value:auto-value:1.2"
}
这个问题是因为
compile'org.parceler:parceler:1.1.5'
gradle
只需删除编译'org.parceler:parceler:1.1.5'
,就可以了
会有用的
我不知道这个问题的根本原因 @Mat他说得有点对,你的应用程序中应该有parceler,该模块应该是一个
apt
/annotationProcessor
条目。与butterkninfe编译器相同。我在这里回答了这个问题: