Skip to content

Dependency conflict when adding google-cloud-translate to Android app. #1361

Closed
@BarryFruitman

Description

@BarryFruitman

This is essentially a dupe of issue #1319 but with Google Translate.

I added the Google Translate Java client library to my Android app per these instructions, which consists of adding this line to my build.gradle file of my library project (which is a dependency of my app project):

compile group: 'com.google.cloud', name: 'google-cloud-translate', version: '0.4.0'

However when I build, I get this error:

Error:Execution failed for task ':typeSmart:transformResourcesWithMergeJavaResForDebug'.
> com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/LICENSE
	File1: C:\Users\Barry\.gradle\caches\modules-2\files-2.1\com.google.auto.value\auto-value\1.1\f6951c141ea3e89c0f8b01da16834880a1ebf162\auto-value-1.1.jar
	File2: C:\Users\Barry\.gradle\caches\modules-2\files-2.1\org.codehaus.jackson\jackson-core-asl\1.9.11\e32303ef8bd18a5c9272780d49b81c95e05ddf43\jackson-core-asl-1.9.11.jar
	File3: C:\Users\Barry\.gradle\caches\modules-2\files-2.1\com.google.inject\guice\4.0\f990a43d3725781b6db7cd0acf0a8b62dfd1649\guice-4.0.jar

I tried all the suggestions in the other issue but I'm happy to go over them again.

I'm using the latest version of Android Studio (2.2.2) with the Gradle wrapper.

Any help is much appreciated. Thanks in advance!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions