我不知道为什么我会得到这个错误。任何帮助都是值得赞赏的
Error:Execution failed for task ':packageAllDebugClassesForMultiDex'.
zipException:重复条目:com/google/zxing/barcodeformat.class
apply plugin: 'android'
buildscript{repositories{mavenCentral()}dependencies{classpath“com.android.tools.build:Gradle:1.3.0”}}allprojects{repositories{jcenter()maven{url“http://releases.payworks.io/artifactory/mpos”}}}android{compileSdkVersion 23 buildToolsVersion“23.0.2”useLibrary“org.apache.http.Legacy”
android
{
packagingOptions
{
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
exclude 'LICENSE.txt'
}
}
defaultConfig
{
multiDexEnabled true
}
dexOptions {
javaMaxHeapSize "2g"
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
instrumentTest.setRoot('tests')
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
}
repositories {
flatDir {
dirs 'libs'
}
}
dependencies {
compile 'io.card:card.io:5.0.1@aar'
compile project(':star')
compile project(':zxing-android-embedded')
compile 'io.payworks:mpos.android.ui:2.7.0:@aar'
compile 'io.payworks:mpos.android.core:2.7.0:@aar'
compile 'io.payworks:mpos.android.accessories.miura:2.7.0:@aar'
compile 'io.payworks:mpos.android.comlinks.bluetooth:2.7.0:@aar'
compile 'io.payworks:mpos.android.accessories.verifone-e105:2.7.0:@aar'
compile 'io.payworks:mpos.android.comlinks.verifone-e105:2.7.0:@aar'
compile 'io.payworks:mpos.android.accessories.sewoo:2.7.0:@aar'
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.squareup:otto:1.3.5'
compile 'com.squareup.okhttp:okhttp:2.7.2'
compile 'com.parse.bolts:bolts-android:1.2.1'
compile 'com.fasterxml.jackson.core:jackson-databind:2.4.4'
compile 'com.verifone:verifone-pwmadk:3.0.2@aar'
compile 'com.android.support:multidex:1.0.1'
compile 'com.google.android.gms:play-services-ads:8.4.0'
compile 'com.google.android.gms:play-services-identity:8.4.0'
compile 'com.google.android.gms:play-services-gcm:8.4.0'
}
dexOptions {
preDexLibraries = false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
我不确定它是否管用,但您可以尝试使用duplicationstrategy
(https://docs.gradle.org/current/javadoc/org/gradle/api/file/duplicatesstrategy.html),如下所示:
packageAllDebugClassesForMultiDex {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
依赖关系{compile fileTree(include:['*.jar'],dir:'libs')testCompile'junit:junit:4.12' 编译'com.firebaseui:firebase-ui-auth:3.2.2' }
错误:任务“:DrivermaticsApp:PackageAllDebugClassesFormultiDex”执行失败。 zipException:重复条目:com/flurry/sdk/jv$a.class 请帮忙... 这是我的建筑。格雷德尔:-
出错的地方:任务': app: transformClassesSusJarMergingForReleas'执行失败。 com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目: com/google/android/gms/内部/测量/zzwn.class 我试图创建一个任务来删除重复项
在尝试构建我的应用程序时,Android Studio抛出以下异常: 项目分级
问题内容: 更新了我的Google Play服务和Google存储库后,我还更新了我的Firebase SDK,当我开始运行该应用程序时收到此错误,但是当我抓取它时,没有错误被编译。 这是我得到的错误: com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目:com / google /