-
Notifications
You must be signed in to change notification settings - Fork 27
Description
When we add your library from Maven (0.4.23) to our SDK it pulls in both Apache httpclient and httpcore.
This results in a duplicate META-INF/DEPENDENCIES resource:
Caused by: com.android.builder.merge.DuplicateRelativeFileException: 2 files found with path 'META-INF/DEPENDENCIES' from inputs:
- /Users/m/.gradle/caches/transforms-3/4edeb743f367f53d909b8c6e94203f1b/transformed/jetified-httpclient-4.5.2.jar
- /Users/m/.gradle/caches/transforms-3/562b29ddf764906d0d191a0ba1b0c987/transformed/jetified-httpcore-4.4.4.jar
Adding a packagingOptions block may help, please refer to
https://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.PackagingOptions.html
+--- com.here.account:here-oauth-client:0.4.23|
+--- org.ini4j:ini4j:0.5.1|
+--- com.fasterxml.jackson.core:jackson-databind:2.10.0.pr1 -> 2.13.0 (*)|
--- org.apache.httpcomponents:httpclient:4.5.2|
+--- org.apache.httpcomponents:httpcore:4.4.4|
+--- commons-logging:commons-logging:1.2|
--- commons-codec:commons-codec:1.9
Which requires any app using our SDK to now have to add a packagingOptions to exclude it:
packagingOptions {
resources.excludes += "META-INF/DEPENDENCIES"
}
We think you should be excluding this duplicate resource as a packagingOptions section in your library build step.