0

I have the following error when updating lifecycle_version from 2.5.1 to 2.6.1:

Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt found in modules jetified-kotlin-stdlib-1.8.10

The reason that both implementations are declarated is the same reason as this question: https://stackoverflow.com/questions/69817925/problem-duplicate-class-androidx-lifecycle-viewmodel-found-in-modules

def lifecycle_version = "2.6.1"
implementation "androidx.lifecycle:lifecycle-viewmodel:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"

What it fixes it is mantaining 2.5.1 version, the problem comes up when updating to 2.6.1...

  • If you are mixing and matching libraries built against Kotlin 1.8 with earlier versions of Kotlin, you need to [depend on the kotlin-bom](https://stackoverflow.com/a/75719642/1676363). – ianhanniballake May 31 '23 at 22:07

0 Answers0