1

Recently I have migrated to AndroidX after that it works fine, but suddenly when I try to make a build, it throws some error like some duplicate files have found in modules

Also I have enabled AndroidX in gradle.properties

android.useAndroidX=true
android.enableJetifier=true

Error

Duplicate class androidx.concurrent.futures.DirectExecutor found in modules
concurrent-futures-1.0.0-alpha02.jar (androidx.concurrent:concurrent-futures:1.0.0-alpha02) 
and futures-1.0.0-alpha01.jar (androidx.concurrent:futures:1.0.0-alpha01)

I am using Viewmodel in my application, i add the viewmodel dependencies

 implementation "androidx.lifecycle:lifecycle-extensions:2.2.0-alpha01"

And for viewmodel savestate, i add

implementation "androidx.lifecycle:lifecycle-viewmodel-savedstate:1.0.0-alpha01"

My problem is when i remove the savestate dependency lib, every thing working fine.

Can anyone help me out with this?

Stack
  • 1,164
  • 1
  • 13
  • 26

0 Answers0