I get this error (AGAIN!) On Android. I recently upgraded to the latest version of gradle 0.7.3, as well as the latest version of the espresso framework (1.1), and I returned to the notorious "duplicate file" error.
Execution failed for task ': mobile: packageTesttype'.
Duplicate Files Copied to APK META-INF / LICENSE.txt File 1: /Users/mwolfe/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpmime/4.2.4/dba4d4d224e2ca872af5be8d2992777583145ime 4.2.4.jar File 2: /Users/mwolfe/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpmime/4.2.4/dba4d4d224e2ca872af5be8d2992777583145478/httpmime-4.2.4.jar
I already installed the build.gradle file to exclude these files. The application builds great for debugging / release and works fine, but when it is created / launched for testing, it fails. In particular, when I try to run tests using the followng command, I get the error mentioned above.
gradle connectedCheck
I also have a library project and each time I tried to add exceptions for both files. This particular dependency is on a library project. Both of them have the following exceptions:
packagingOptions {
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/LICENSE.txt'
}
I also tried removing the META-INF part above, as shown in the espresso docs: https://code.google.com/p/android-test-kit/wiki/Espresso#Espresso_Setup_Instructions
I know that I can delete these files from cans, but this is pretty pain.