I use version 2 of WorkManager that is in the androidX package.
I also use another library which uses v1 of WorkManager which is in the Arch component package.
When I sync the project, sync finishes successfully, but when I try to build the project. I get the following error that says you have duplicate values.
Version I use in my Gradle:
"androidx.work:work-runtime-ktx:2.0.1"
Version added to the library:
'android.arch.work:work-runtime-ktx:1.0.1'
The error:
Duplicate class androidx.work.ArrayCreatingInputMerger found in modules classes.jar (android.arch.work:work-runtime:1.0.0-rc01) and classes.jar (androidx.work:work-runtime:2.0.1)
Duplicate class androidx.work.BackoffPolicy found in modules classes.jar (android.arch.work:work-runtime:1.0.0-rc01) and classes.jar (androidx.work:work-runtime:2.0.1)
Duplicate class androidx.work.Configuration found in modules classes.jar (android.arch.work:work-runtime:1.0.0-rc01) and classes.jar (androidx.work:work-runtime:2.0.1)
Duplicate class androidx.work.Configuration$Builder found in modules classes.jar (android.arch.work:work-runtime:1.0.0-rc01) and classes.jar (androidx.work:work-runtime:2.0.1)
...
I also have added these to my gradle.properties:
android.useAndroidX=true
android.enableJetifier=true