In 0.7.1 there's a DSL which lets you filter out files. I don't know if any
files are excluded by default (Xav would know) but here's the syntax:

android {
  packagingOptions {
    exclude 'META-INF/LICENSE.txt'
  }
}


On Mon, Jan 6, 2014 at 5:33 AM, Yaroslav Mytkalyk
<[email protected]>wrote:

> What I get is
>
> [code]
> Error: duplicate files during packaging of APK
> /home/doctor/Documents/idea/workspace_purefm/PureFileManager/purefm/build/apk/purefm-debug-unaligned.apk
>         Path in archive: META-INF/LICENSE.txt
>         Origin 1:
> /home/doctor/Documents/idea/workspace_purefm/PureFileManager/purefm/libs/commons-io-2.4.jar
>         Origin 2:
> /home/doctor/Documents/idea/workspace_purefm/PureFileManager/purefm/libs/commons-codec-1.9.jar
> You can ignore those files in your build.gradle:
>         android {
>           packagingOptions {
>             exclude 'META-INF/LICENSE.txt'
>           }
>         }
> :purefm:packageDebug FAILED
>
> FAILURE: Build failed with an exception.
>
> * What went wrong:
> Execution failed for task ':purefm:packageDebug'.
> > Duplicate files copied in APK META-INF/LICENSE.txt
>         File 1:
> /home/doctor/Documents/idea/workspace_purefm/PureFileManager/purefm/libs/commons-io-2.4.jar
>         File 2:
> /home/doctor/Documents/idea/workspace_purefm/PureFileManager/purefm/libs/commons-io-2.4.jar
> [/code]
>
> I thought it has been fixed in 0.7.1 but I'm using 0.7.3+
>
> buildscript {
>     repositories {
>         mavenCentral()
>     }
>     dependencies {
>         classpath 'com.android.tools.build:gradle:0.7.3+'
>     }
> }
>
> I created a new Gradle project in Android Studio 0.4.0.
> It was 0.7.+ by default in build.gradle so I changed to 0.7.3+.
> I am completely positive that I don't have build.gradle with different
> version anywhere.
> Why am I getting this error?
>
> --
> You received this message because you are subscribed to the Google Groups
> "adt-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to