java - Retrofit2 DuplicateFileException -
hi im new retrofit , got 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.retrofit2/retrofit/pom.properties file1: c:\users\loudoms\documents\piczon\loock2\app\libs\retrofit-2.0.0-beta3.jar file2: c:\users\loudoms\.gradle\caches\modules-2\files-2.1\com.squareup.retrofit2\retrofit\2.0.0-beta3\97675641051febfee098903cc0eff62f2826e34e\retrofit-2.0.0-beta3.jar
i tried include packaging options didn't work. me please don't know or remove.
my gradle looks this:
apply plugin: 'com.android.application' android { compilesdkversion 23 buildtoolsversion "23.0.0" defaultconfig { applicationid "com.example.loudoms.loock" minsdkversion 15 targetsdkversion 23 versioncode 1 versionname "1.0" } buildtypes { release { minifyenabled false proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro' } } packagingoptions { exclude 'meta-inf/asl2.0' exclude 'meta-inf/license.txt' exclude 'meta-inf/notice' } } dependencies { compile filetree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:support-v4:23.1.1' compile 'com.android.support:appcompat-v7:23.1.1' compile 'com.android.support:recyclerview-v7:23.1.1' compile 'com.android.support:cardview-v7:23.1.1' compile 'com.android.support:design:23.1.1' compile 'com.squareup.retrofit2:retrofit:2.0.0-beta3' compile 'com.squareup.retrofit2:converter-gson:2.0.0-beta3' compile 'com.jakewharton:butterknife:7.0.1' }
this question because modulea , moduleb has same jar(also jar has meta-inf direct), method is:create new module(select library),then take jar join module's "libs" direct,then let modulea , moduleb dependent module library. in way,no duplicatefileexception.
Comments
Post a Comment