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...