java - Duplicate files copied in APK META-INF -
hi im new in android development, trying build apk got erorr. , update gradle , got duplicate copy. how can fix error?
error:execution failed task ':app:transformresourceswithmergejavaresfordebug'. > com.android.build.api.transform.transformexception: com.android.builder.packaging.duplicatefileexception: duplicate files copied in apk meta-inf/maven/com.squareup.okhttp/okhttp/pom.properties file1: c:\users\toshiba\.gradle\caches\modules-2\files-2.1\com.squareup.okhttp\okhttp\2.0.0\4c8d1536dba3812cc1592090dc20c47a4ed3c35e\okhttp-2.0.0.jar file2: c:\users\toshiba\.gradle\caches\modules-2\files-2.1\com.crashlytics.android\crashlytics\1.1.13\e821eafa1bf489a26bdb71f95078c26785b37a1\crashlytics-1.1.13.jar
and here's build.gradle error comes?
buildscript { repositories { maven { url 'http://download.crashlytics.com/maven' } } dependencies { classpath 'com.crashlytics.tools.gradle:crashlytics-gradle:1.+' } } apply plugin: 'com.android.application' apply plugin: 'crashlytics' android { compilesdkversion 20 buildtoolsversion "20.0.0" defaultconfig { applicationid "com.mymonas.ngobrol" minsdkversion 14 targetsdkversion 20 versioncode 1 versionname "0.9.0.68" } buildtypes { release { minifyenabled false proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro' } } } repositories { mavencentral() maven { url 'http://download.crashlytics.com/maven' } } dependencies { compile filetree(dir: 'libs', include: ['*.jar'], exclude: 'android-support-v4.jar') compile project('libs:floatlabel') compile 'com.android.support:support-v4:21.0.0' compile 'com.android.support:support-v13:21.0.0' compile 'com.squareup.retrofit:retrofit:1.7.0' compile 'com.squareup.okhttp:okhttp-urlconnection:2.0.0' compile 'com.squareup.okhttp:okhttp:2.0.0' compile 'com.github.dmytrodanylyk.android-process-button:library:1.0.1' compile 'com.google.android.gms:play-services:6.1.11' compile 'com.viewpagerindicator:library:2.4.1@aar' compile 'com.astuetz:pagerslidingtabstrip:1.0.1' compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.3' compile 'com.makeramen:roundedimageview:1.3.0' compile 'com.andreabaccega:android-form-edittext:1.1.0@aar' compile 'com.crashlytics.android:crashlytics:1.+' }
i had same or @ least similar problem today our react native app. problem on mac though. plausible explanation think of updated bunch of android studio tools , gradle couldn't build our dependencies. anyways after excluding pom.properties
, pom.xml
okhttp kept getting same error turns out had exclude more files. complete packagingoptions
in build.gradle:
packagingoptions { exclude 'meta-inf/maven/com.squareup.okhttp3/okhttp/pom.properties' exclude 'meta-inf/maven/com.squareup.okio/okio/pom.xml' exclude 'meta-inf/maven/com.squareup.okhttp3/okhttp/pom.xml' exclude 'meta-inf/maven/com.squareup.okio/okio/pom.properties' }
Comments
Post a Comment