awslabs / aws-mobile-appsync-sdk-android

Android SDK for AWS AppSync.
https://docs.amplify.aws/sdk/api/graphql/q/platform/android/
Apache License 2.0
105 stars 58 forks source link

Duplicate Resources Error during Build (FAT AAR + v3.1.4) #348

Closed RyanWarwick closed 3 years ago

RyanWarwick commented 3 years ago

Describe the bug Duplicate Resources Error in values.xml (attr/fontVariationSettings) when building with FAT AAR and com.amazonaws:aws-android-sdk-appsync:3.1.4

To Reproduce In Android Studio (Gradle Plugin: 4.2.1 and Gradle Version 6.8.3):

Specify

dependencies {

    implementation 'androidx.appcompat:appcompat:1.3.0'
    embed ('com.amazonaws:aws-android-sdk-appsync:3.1.4')
}
fataar {

    transitive = true
}

in library's build.gradle.

The version of

classpath 'com.amazonaws:aws-android-sdk-appsync-gradle-plugin:3.1.4'

in project's build.gradle does not matter.

I tried with

- appsync:3.1.1 + appsync-gradle-plugin:3.1.4 
- appsync:3.1.1 + appsync-gradle-plugin:3.1.1

both work

but

- appsync:3.1.4 + appsync-gradle-plugin:3.1.1 

does not work.

It seems to be explicitly

com.amazonaws:aws-android-sdk-appsync:3.1.4'

when using FAT AAR (transitive = true)

Expected behavior No errors, successful build

Screenshots appsync-sdk-android

Environment(please complete the following information):

Device Information (please complete the following information):

RyanWarwick commented 3 years ago

Seems to be due to specifying

   embed('androidx.appcompat:appcompat:1.2.0'){
        transitive=true
    }

and

embed('androidx.core:core:1.3.0') {
                transitive = true
    }
at the same time , while using transitive= true.