How to solve 'Program type already present: com.google.common.util.concurrent.ListenableFuture'?

后端 未结 4 1493
北荒
北荒 2020-12-05 06:14

I am trying to use WorkManager 1.0.0-alpha09. and getting this error:

Program type already present: 
com.google.common.util.concurrent.ListenableFuture

Mess         


        
4条回答
  •  伪装坚强ぢ
    2020-12-05 06:40

    I am using ListenableFuture that comes from the work manager.

    implementation("android.arch.work:work-runtime:1.0.0")
    

    So excluding exclude group: 'com.google.guava', module: 'listenablefuture', didn't work for me.

    I was using a dependency that internally used androidTestImplementation "com.google.truth:truth:42" that internally used com.google.guava:guava:25.0.1-android. This was causing the problem for me.

    Upgrading com.google.truth:truth to 43 solved it for me.

提交回复
热议问题