Shopify / mobile-buy-sdk-android

Shopify’s Mobile Buy SDK makes it simple to sell physical products inside your mobile app. With a few lines of code, you can connect your app with the Shopify platform and let your users buy your products using their credit card.
MIT License
216 stars 136 forks source link

Duplicate class com.shopify.graphql.support.AbstractResponse found in modules jetified-buy3-10.0.1-runtime (com.shopify.mobilebuysdk:buy3:10.0.1) and jetified-support-0.2.1 (com.shopify.graphql.support:support:0.2.1) #706

Closed arohim closed 3 years ago

arohim commented 3 years ago

I'm trying to use the latest version of Shopify SDK 10.0.1, but when I compile the app I got this error

Duplicate class com.shopify.graphql.support.AbstractResponse found in modules jetified-buy3-10.0.1-runtime (com.shopify.mobilebuysdk:buy3:10.0.1) and jetified-support-0.2.1 (com.shopify.graphql.support:support:0.2.1)
Duplicate class com.shopify.graphql.support.Arguments found in modules jetified-buy3-10.0.1-runtime (com.shopify.mobilebuysdk:buy3:10.0.1) and jetified-support-0.2.1 (com.shopify.graphql.support:support:0.2.1)
Duplicate class com.shopify.graphql.support.Error found in modules jetified-buy3-10.0.1-runtime (com.shopify.mobilebuysdk:buy3:10.0.1) and jetified-support-0.2.1 (com.shopify.graphql.support:support:0.2.1)
Duplicate class com.shopify.graphql.support.ID found in modules jetified-buy3-10.0.1-runtime (com.shopify.mobilebuysdk:buy3:10.0.1) and jetified-support-0.2.1 (com.shopify.graphql.support:support:0.2.1)
Duplicate class com.shopify.graphql.support.Input found in modules jetified-buy3-10.0.1-runtime (com.shopify.mobilebuysdk:buy3:10.0.1) and jetified-support-0.2.1 (com.shopify.graphql.support:support:0.2.1)
Duplicate class com.shopify.graphql.support.InvalidGraphQLException found in modules jetified-buy3-10.0.1-runtime (com.shopify.mobilebuysdk:buy3:10.0.1) and jetified-support-0.2.1 (com.shopify.graphql.support:support:0.2.1)
Duplicate class com.shopify.graphql.support.Node found in modules jetified-buy3-10.0.1-runtime (com.shopify.mobilebuysdk:buy3:10.0.1) and jetified-support-0.2.1 (com.shopify.graphql.support:support:0.2.1)
Duplicate class com.shopify.graphql.support.Nullable found in modules jetified-buy3-10.0.1-runtime (com.shopify.mobilebuysdk:buy3:10.0.1) and jetified-support-0.2.1 (com.shopify.graphql.support:support:0.2.1)
Duplicate class com.shopify.graphql.support.Query found in modules jetified-buy3-10.0.1-runtime (com.shopify.mobilebuysdk:buy3:10.0.1) and jetified-support-0.2.1 (com.shopify.graphql.support:support:0.2.1)
Duplicate class com.shopify.graphql.support.SchemaViolationError found in modules jetified-buy3-10.0.1-runtime (com.shopify.mobilebuysdk:buy3:10.0.1) and jetified-support-0.2.1 (com.shopify.graphql.support:support:0.2.1)
Duplicate class com.shopify.graphql.support.TopLevelResponse found in modules jetified-buy3-10.0.1-runtime (com.shopify.mobilebuysdk:buy3:10.0.1) and jetified-support-0.2.1  @(com.shopify.graphql.support:support:0.2.1)

Go to the documentation to learn how to Fix dependency resolution errors.

And I found the class inside the library (jetified-support-0.2.1) and (com.shopify.mobilebuysdk:buy3:10.0.1) both has exactly classes inside the package com.shopify.graphql.support

Screen Shot 2021-07-20 at 19 19 51

Anyone know how to fix this?

arohim commented 3 years ago

I know how to fix this we can just exclude the com.shopify.graphql.support out from the sdk

implementation('com.shopify.mobilebuysdk:buy3:10.0.1') {
    exclude group: "com.shopify.graphql.support"
}
adario commented 3 years ago

@arohim I've tried the exclude directive but I'm getting the same error — do you remember whether there's anything else you've had to do? Thanks.

arohim commented 3 years ago

@adario can you try to invalidate caches to refresh all the libraries, it should be working.

adario commented 2 years ago

Ok, thanks.

On 6 Oct 2021, at 06:20, a-rohim @.***> wrote:

 @adario can you try to invalidate caches to refresh all the libraries, it should be working.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

khalilurrehman28 commented 2 years ago

implementation ('com.shopify.mobilebuysdk:buy3:14.0.0'){ exclude group: "com.shopify.graphql.support" }

koushikMM commented 1 year ago

for kotlin gradle { exclude(group = "com.shopify.graphql.support") }