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

[Android] Dependency collision with @nstudio/nativescript-carousel #16

Open
timoschlueter opened this issue Apr 19, 2022 · 3 comments
Open

Comments

@timoschlueter
Copy link

Hi everyone,

I ran into problem today with this plugin in combination with another NativeScript plugin (@nstudio/nativescript-carousel).
Both plugins in their latest versions make use of the PageIndicatorView. When both plugins are used in the same project, the build process for Android fails with the following message:

Execution failed for task ':app:checkReleaseDuplicateClasses'.
Duplicate class com.rd.IndicatorManager found in modules jetified-PageIndicatorView-1.0.6-runtime (com.github.adrielcafe:PageIndicatorView:1.0.6) and jetified-PageIndicatorView-b1bad589b5-runtime (com.github.romandanylyk:PageIndicatorView:b1bad589b5)
Duplicate class com.rd.IndicatorManager$Listener found in modules jetified-PageIndicatorView-1.0.6-runtime (com.github.adrielcafe:PageIndicatorView:1.0.6) and jetified-PageIndicatorView-b1bad589b5-runtime (com.github.romandanylyk:PageIndicatorView:b1bad589b5)
Duplicate class com.rd.PageIndicatorView found in modules jetified-PageIndicatorView-1.0.6-runtime (com.github.adrielcafe:PageIndicatorView:1.0.6) and jetified-PageIndicatorView-b1bad589b5-runtime (com.github.romandanylyk:PageIndicatorView:b1bad589b5)

Digging deeper into this i found out that there is a collision between the two plugins:

@nativescript-community/ui-pager

	implementation 'com.github.adrielcafe:PageIndicatorView:1.0.6'

See here

@nstudio/nativescript-carousel

	implementation 'com.github.romandanylyk:PageIndicatorView:b1bad589b5'

See here

It there any solution for this issue? What is the difference between the two implementations? I think both plugins should be able to work in the same project.

@bk-js
Copy link

bk-js commented Aug 15, 2022

I ran into the same issue. Any updates on this?

@timoschlueter
Copy link
Author

Unfortunately not. We did not find a solution for this yet. :/

@lucasumberto
Copy link

lucasumberto commented Sep 6, 2022

I was upgrading my app, after 2 years and got this error...
Both plugins implements same classes, and break the build.
I was trying to solve using those topics as help, but I got no luck... maybe help someone:

https://stackoverflow.com/questions/56695106/duplicated-classes-found-in-modules-classes-jar
EddyVerbruggen/nativescript-barcodescanner#219
NathanaelA/nativescript-zxing#4
https://stackoverflow.com/questions/59600981/getting-error-execution-failed-for-task-appcheckdebugduplicateclasses
https://developer.android.com/studio/build/dependencies

As I remember I choose to use both plugins because a problem to use one of them (I don't remember which one) did not work in one of the platforms so i opted to use Carrousel for iOS and Pager for android.

Maybe now I can use only one plugin for both, I will try it now.
Edit: my carousel implementation doesn't worked in Android, but Pager worked for IOS. so I will keep the pager (but unfortunately Carousel is prettier on iOS)..

Ah.. another information is that this problem only happens on android build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants