Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate files when consuming SDK from an Android project #1940

Closed
jamesonwilliams opened this issue Jul 4, 2020 · 1 comment
Closed

Duplicate files when consuming SDK from an Android project #1940

jamesonwilliams opened this issue Jul 4, 2020 · 1 comment
Labels
feature-request A feature should be added or improved.

Comments

@jamesonwilliams
Copy link

jamesonwilliams commented Jul 4, 2020

When I try to include the AWS Java SDK V2 in my boilerplate Android project, the build fails:

More than one file was found with OS independent path 'META-INF/INDEX.LIST'

There is a workaround available, using the Android packagingOptions. However, I would prefer not to apply them, if possible.

This issue is requesting the SDK to solve the conflict internally, to improve the Android developer experience.

All in all, I need to add these packagingOptions to my project:

android {
    packagingOptions {
        exclude 'META-INF/INDEX.LIST'
        exclude 'META-INF/io.netty.versions.properties'
        exclude 'META-INF/DEPENDENCIES'
        
        exclude 'codegen-resources/customization.config'
        exclude 'codegen-resources/examples-1.json'
        exclude 'codegen-resources/waiters-2.json'
        exclude 'codegen-resources/service-2.json'
        exclude 'codegen-resources/paginators-1.json'
    }
}

I am building with Android Studio 4.0.0. The JDK is:

openjdk version "1.8.0_242-release"
OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
OpenJDK 64-Bit Server VM (build 25.242-b3-6222593, mixed mode)

The simple code that causes the issue is:

val iot = IotClient.builder()
    .region(Region.US_EAST_1)
    .httpClient(UrlConnectionHttpClient.create())
    .credentialsProvider(StaticCredentialsProvider.create(myCredentials))
    .build()

I tested with version 2.13.49 of the SDK.

@jamesonwilliams jamesonwilliams added guidance Question that needs advice or information. needs-triage This issue or PR still needs to be triaged. labels Jul 4, 2020
@debora-ito debora-ito added feature-request A feature should be added or improved. and removed guidance Question that needs advice or information. needs-triage This issue or PR still needs to be triaged. labels Sep 9, 2020
aws-sdk-java-automation added a commit that referenced this issue Feb 18, 2022
…1cac4773d

Pull request: release <- staging/ebcb5ad8-0936-49af-9a55-3a21cac4773d
@jamesonwilliams jamesonwilliams closed this as not planned Won't fix, can't repro, duplicate, stale Oct 19, 2022
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved.
Projects
None yet
Development

No branches or pull requests

2 participants