TransformException:java.util.zip.ZipException:重复条目:com / google / zxing / BarcodeFormat.class

时间:2017-09-11 11:43:23

标签: android android-studio

我有错误PLZ帮助我。请让我知道这里究竟需要什么,我可以看到相同的源在Android 5.0及以上virsion运行正常但是android 4.1,4.2不起作用我可以看到以下错误。

错误:任务':app:transformClassesWithJarMergingForDebug'执行失败。

  

com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目:com / google / zxing / BarcodeFormat.class

我的gradle文件是

    apply plugin: 'com.android.application'

    android
            {
                compileSdkVersion 24
                buildToolsVersion '25.0.0'
                useLibrary 'org.apache.http.legacy'
                defaultConfig {
                    vectorDrawables.useSupportLibrary = true
                    applicationId "com.example.admin"
                    multiDexEnabled true
                    minSdkVersion 15
                    targetSdkVersion 24
                    versionCode 1
                    versionName "1.0"
                    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
                }
                buildTypes {
                    release {
                        minifyEnabled false
                        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
                    }
                    debug {
                        minifyEnabled false
                        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
                    }
                }

                dexOptions {
                    javaMaxHeapSize "4g"
                    preDexLibraries = false
                }

            }

    repositories
            {
                maven
                        {
                            url "https://jitpack.io"
                        }
                jcenter { url "http://jcenter.bintray.com/" }
                mavenCentral()
            }

    dependencies {
        androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
            exclude group: 'com.android.support', module: 'support-annotations'
        })
        testCompile 'junit:junit:4.12'
        compile 'com.android.support:appcompat-v7:24.2.1'
        compile 'com.android.support:mediarouter-v7:24.2.1'
        compile 'com.android.support:support-v4:24.2.1'
        compile 'com.android.support:design:24.2.1'
        compile 'com.android.support:cardview-v7:24.2.1'
       // compile 'com.android.support.constraint:constraint-layout:1.0.2'
        compile 'com.squareup.picasso:picasso:2.5.2'
        compile 'com.github.PhilJay:MPAndroidChart:v2.1.6'
        compile 'com.google.android.gms:play-services-auth:9.2.0'
        compile 'com.google.android.gms:play-services-base:9.2.0'
        compile 'com.google.android.gms:play-services-maps:9.2.0'
        compile 'com.google.android.gms:play-services-places:9.2.0'
        compile 'com.google.android.gms:play-services-location:9.2.0'
        compile 'com.google.android.gms:play-services-plus:9.2.0'
        compile 'com.google.android.gms:play-services-appindexing:9.2.0'
        compile 'com.google.android.gms:play-services-gcm:9.2.0'
        compile 'com.google.android.gms:play-services-analytics:9.2.0'
        compile 'com.prolificinteractive:material-calendarview:1.4.2'
        compile 'com.dlazaro66.qrcodereaderview:qrcodereaderview:1.0.0'
        compile 'com.yahoo.mobile.client.android.util.rangeseekbar:rangeseekbar-library:0.1.0'
        compile 'org.apache.httpcomponents:httpclient:4.5'
        compile 'com.razorpay:checkout:1.+'
        compile 'com.facebook.android:facebook-android-sdk:[4,5)'
        compile 'org.twitter4j:twitter4j-core:4.0.5'
        compile 'com.android.support:multidex:1.0.1'
        compile 'de.greenrobot:greendao:2.1.0'

    }

1 个答案:

答案 0 :(得分:1)

  1. 试试这个我也面临同样的问题。

  2. 在终端执行根文件夹

  3. Page a = 10$ Page b = 12.5$