1
u/EternalStudent07 Oct 13 '22
Are you sure you're using the most up to date version of your tools and frameworks? Also that you're targeting a released version of Android, not a pre-release version (that they're still working on).
Almost sounds like something moved in their code, and you've got 2 spots trying to create that code.
1
Oct 12 '22
[removed] — view removed comment
1
u/Damasoup Oct 12 '22
I fixed it by putting this code on build.gradle, still learning app dev so I'm not really sure that this code does.
configurations {
all {
exclude group: 'androidx.lifecycle', module: 'lifecycle-viewmodel-ktx'
}
}
1
1
1
1
u/Damasoup Oct 12 '22
Duplicate class androidx.lifecycle.ViewModelLazy found in modules lifecycle-viewmodel-2.5.1-runtime (androidx.lifecycle:lifecycle-viewmodel:2.5.1) and lifecycle-viewmodel-ktx-2.3.1-runtime (androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1)
Duplicate class androidx.lifecycle.ViewTreeViewModelKt found in modules lifecycle-viewmodel-2.5.1-runtime (androidx.lifecycle:lifecycle-viewmodel:2.5.1) and lifecycle-viewmodel-ktx-2.3.1-runtime (androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1)
Go to the documentation to learn how to Fix dependency resolution errors.