android - TransformException: java.util.zip.ZipException: duplicate entry: com/google/zxing/BarcodeFormat.class -


i have got error plz me.please let me know require here, can see same source running fine in android 5.0 , above virsion android 4.1, 4.2 not work can see following errors.

error:execution failed task ':app:transformclasseswithjarmergingfordebug'.

com.android.build.api.transform.transformexception: java.util.zip.zipexception: duplicate entry: com/google/zxing/barcodeformat.class

my gradle file

    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. try facing same problem.

  2. in terminal execute in root folder


./gradlew clean


Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -