DEV Community

Cover image for Fix React Native Android builds "Duplicate class kotlin.collections.* found in modules jetified-kotlin-stdlib-1.8.0"

Fix React Native Android builds "Duplicate class kotlin.collections.* found in modules jetified-kotlin-stdlib-1.8.0"

Davyd NRB on January 26, 2023

When I got up this morning, I was perplexed to see that our CI/CD builds were failing repeatedly with the following error: Execution failed for ...
Collapse
 
mwerder profile image
werder

Thank you so much! Wasted like 3 hours on that!

Collapse
 
abbasalim profile image
Abbasali

great! this worked for me also

Collapse
 
davelsan profile image
David Velasco

Just logged in to say thank you.

Collapse
 
retyui profile image
Davyd NRB

You're the best.

Collapse
 
tjdesigner profile image
Tiago de Jesus

Thank you so much!!! I lost a lot of time with this problem. God bless you! 🚀🚀🚀

Collapse
 
nbimmosnapp profile image
nb-immosnapp

Thanks you so much!

Collapse
 
brankoeisi profile image
Branko Bajic

Created an account just to thank you

Collapse
 
phen1x profile image
pheN1x

Thank you so much my friend! 100+ build failed yesterday can you explain us how did you find this?

Collapse
 
petermalinovskiy profile image
Peter Malinovsky • Edited

Thank you for the post. I meet the same errors and your first solution helped to fix them. I try to find a better sollution. I upgraded Kotlin to the latest version and it works fine.

Collapse
 
retyui profile image
Davyd NRB

Please give additional information about how you updated Kotlin in your project or on CI?

Collapse
 
jensneuber profile image
Jens Neuber

Thanks!

Collapse
 
yandamuri profile image
Syam Kishore

Issue resolved. Thank you.

I am a react-native developer and there is no kotlin code in my project, I do not do any bridging.

Still Do i need to maintain any plugins or constrains related to Kotlin?

Collapse
 
retyui profile image
Davyd NRB

I'm happy to hear that

Collapse
 
vishalisharani profile image
Vishal-Isharani

Thank you so much.

Collapse
 
arnoldwafula profile image
Arnold Wafula

THANK YOU VERY MUCH FOR THIS. I was almost getting a headache trying to figure it out.

Collapse
 
rabimezan profile image
Rabi

How can I update this in expo project because android/app/build.gradle is not available in my project directory??.

Collapse
 
retyui profile image
Davyd NRB

you can create own config plugin docs.expo.dev/guides/config-plugins/ that inject this value

Collapse
 
pogudotanya profile image
Tatyana Pogudo

Thank you so much! It helped me 💪

Collapse
 
quangvinh_dang_c5994eefa profile image
Quang Vinh Dang

Thank you so much.

Collapse
 
mrchala profile image
MrChala

gracias gracias.. excelente

Collapse
 
carlcraig profile image
Carl Craig

Thanks for this!! 🚀🚀🚀

Collapse
 
vungn profile image
Vũ N

Thank you so much!