razorpay / razorpay-android-custom-sample-app

Sample app to demonstrate the custom UI integration
MIT License
13 stars 9 forks source link

Duplicate classes error between SDK implementation 'com.razorpay:checkout:1.6.26' implementation 'com.razorpay:customui:3.9.15' #66

Open ghost opened 1 year ago

ghost commented 1 year ago

We are using custom Android SDK implementation 'com.razorpay:customui:3.9.15' for custom ui and now i am using another SDK implementation 'com.razorpay:checkout:1.6.26' for emandate but getting errors duplicate classes error like "Duplicate class com.razorpay.AdvertisingIdUtil found in modules checkout-1.6.26-runtime (com.razorpay:checkout:1.6.26) and customui-3.9.15-runtime (com.razorpay:customui:3.9.15)". How we can resolve it?

vinz-mehra commented 7 months ago

Any update? is there no way to use both Custom Checkout and Standard checkout in the same app?

vivek-sha1 commented 6 months ago

Both com.razorpay:checkout:1.6.26 and com.razorpay:customui:3.9.15 have all classes define under com.razorpay package name if you extract both library, making it impossible to use both library in same application.

Ideally, they should structure their library in such a way that all common classes should be in com.razorpay package and all separate classes in com.razorpay.checkout and com.razorpay.customui. That way client can use both library in their application and take leverage of Gradle exclude module feature to avoid duplicate class exception.