gradle - Android Studio Build not working after migration from Eclipse -
i'm migrating android project eclipse android studio. original project relied on 2 apache libraries: commons-io-2.4.jar , commons-codec-1.9.jar.
i've copied these jar files proper libs directory , updated build.gradle reflect this:
dependencies { compile project(':aviarysdk') compile project(':showcaseview') compile 'com.google.code.gson:gson:2.3.1' compile 'com.google.android.gms:play-services:+' compile files('libs/commons-cli-1.2.jar') compile files('libs/httpclient-4.3.1.jar') compile files('libs/httpcore-4.3.jar') compile files('libs/httpmime-4.3.1.jar') compile files('libs/metadata-extractor-2.6.4.jar') compile files('libs/tape-1.1.0.jar') compile files('libs/commons-codec-1.9.jar') compile files('libs/commons-io-2.4.jar')
}
when try build project duplication error message:
error:duplicate files during packaging of apk /users/gkipnis/repos/floomitandroidclient/floomitnewcamera/build/outputs/apk/floomitnewcamera-debug-unaligned.apk path in archive: meta-inf/license.txt origin 1: /users/gkipnis/repos/floomitandroidclient/floomitnewcamera/libs/commons-io-2.4.jar origin 2: /users/gkipnis/repos/floomitandroidclient/floomitnewcamera/libs/commons-codec-1.9.jar can ignore files in build.gradle: android { packagingoptions { exclude 'meta-inf/license.txt' } } error:execution failed task ':floomitnewcamera:packagedebug'. > duplicate files copied in apk meta-inf/license.txt file 1: /users/gkipnis/repos/floomitandroidclient/floomitnewcamera/libs/commons-io-2.4.jar file 2: /users/gkipnis/repos/floomitandroidclient/floomitnewcamera/libs/commons-io-2.4.jar information:build failed information:total time: 3.144 secs
can provide pointers might going on.
thank you, gary kipnis
as suggested error message add part build.gradle
android { packagingoptions { exclude 'meta-inf/license.txt' } }
Comments
Post a Comment