AndroidHttpMockingExamples icon indicating copy to clipboard operation
AndroidHttpMockingExamples copied to clipboard

Gradle DuplicateFileException

Open ohadnav opened this issue 7 years ago • 4 comments

Building the WireMock tests fails with

Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebugAndroidTest'. > com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/LICENSE File1: /Users/ohad/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-annotations/2.8.0/45b426f7796b741035581a176744d91090e2e6fb/jackson-annotations-2.8.0.jar File2: /Users/ohad/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-core/2.8.5/60d059f5d2930ccd1ef03535b713fd9f933d1ba7/jackson-core-2.8.5.jar File3: /Users/ohad/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-databind/2.8.5/b3035f37e674c04dafe36a660c3815cc59f764e2/jackson-databind-2.8.5.jar

I have fixed it by adding: exclude group: 'com.fasterxml.jackson.core' to WireMock build rule: androidTestCompile("com.github.tomakehurst:wiremock:2.6.0") {

ohadnav avatar May 23 '17 12:05 ohadnav

Now the tests fail at runtime

ohadnav avatar May 23 '17 13:05 ohadnav

Did anyone find the solution for this problem ? I am also facing the same issue :(

kglondhe avatar Jun 22 '17 20:06 kglondhe

@ohadnav & @kglondhe - I just pushed a TON of updates to the repo. Let me know if you still have any issues. Cheers.

handstandsam avatar Sep 18 '17 04:09 handstandsam

After all the updates, I just ran all the tests and got: screen shot 2017-09-17 at 9 41 06 pm

handstandsam avatar Sep 18 '17 04:09 handstandsam