Scarlet icon indicating copy to clipboard operation
Scarlet copied to clipboard

Duplicate dependency compilation error when trying to install core and websockets (0.1.9)

Open whoyawn opened this issue 5 years ago • 11 comments

    implementation 'com.tinder.scarlet:scarlet:0.1.9'
    implementation "com.tinder.scarlet:scarlet-websocket-okhttp:0.1.9"

gives me this when I build:

Duplicate class com.tinder.scarlet.Deserialization found in modules scarlet-core-0.1.9.jar (com.github.tinder.scarlet:scarlet-core:0.1.9) and scarlet-core-0.1.9.jar (com.tinder.scarlet:scarlet-core:0.1.9)
... bunch of other duplicates

Installing only one or the other results in missing packages.

How do I install the plugin without having a bunch of duplicate symbols?

whoyawn avatar Aug 07 '19 23:08 whoyawn

it looks like you have com.github.tinder.scarlet:scarlet-core:0.1.9 declared somewhere in your dependencies

aaronweihe avatar Aug 07 '19 23:08 aaronweihe

Those two are the only ones I have. Could this be an issue with the websocket dependency also installing core again?

whoyawn avatar Aug 08 '19 17:08 whoyawn

I had the same issue. I fixed it by switching to 0.1.17

akindofyoga avatar Aug 08 '19 19:08 akindofyoga

Installing 0.2.4 for both also did the trick for me.

whoyawn avatar Aug 08 '19 21:08 whoyawn

They said 0.1.x is the production version, so 0.1.17 seemed like a better option.

akindofyoga avatar Aug 08 '19 22:08 akindofyoga

I'm not able to reproduce this. can you provide a sample project?

aaronweihe avatar Aug 16 '19 17:08 aaronweihe

You can prevent this by taking your root build gradle file and declaring the dependencies in it and then just calling implementation libs.dependency that way you are always sure you are not only not duplicating but also having consistent versions across. In the end gradle is smart enough to resolve its graph and you should not have issues ;)

joelromanpr avatar Sep 04 '19 01:09 joelromanpr

I'm not able to reproduce this. can you provide a sample project?

https://github.com/rogerthat94/ScarletError

I get the error when I try building this.

akindofyoga avatar Sep 04 '19 02:09 akindofyoga

It looks like I run into the error if I use Scarlet 0.1.9 from Jitpack. But it works fine with Scarlet 0.1.9 from JCenter.

akindofyoga avatar Sep 08 '19 17:09 akindofyoga

Scarlet 0.1.8+ are available only in maven central, and the group id is now com.tinder instead of com.github.tinder

aaronweihe avatar Sep 09 '19 16:09 aaronweihe

You should use:

implementation 'com.tinder.scarlet:scarlet:0.1.9'
implementation "com.tinder.scarlet:websocket-okhttp:0.1.9"

without scarlet- prefix

mladen1nf avatar Sep 18 '19 21:09 mladen1nf