Saturday, 14 May 2022

How to resolve the duplicate class error in between react native and android sdk?

I have a third party image recognition sdk library for my android application. Noe i want to integrate that to my react native project using native modules. I have some conflicts between the sdk's code and react native code.

I have tried removing the conflict from react native by the below code

implementation ("com.facebook.react:react-native:+") {
        exclude group: "com.facebook.yoga", module: "proguard-annotations"
    }

My error looks as below

Duplicate class com.facebook.proguard.annotations.DoNotStrip found in modules 3rd party sdk (3rdpartysdk.aar) and jetified-proguard-annotations-1.19.0 (com.facebook.yoga:proguard-annotations:1.19.0)

Duplicate class com.facebook.proguard.annotations.KeepGettersAndSetters found in modules 3rd party sdk (3rdpartysdk.aar) and jetified-react-native-0.67.1-runtime (com.facebook.react:react-native:0.67.1)

I have tried several things from the internet, but none relly seems to help

react-native : 0.67.1



from How to resolve the duplicate class error in between react native and android sdk?

No comments:

Post a Comment