我的应用程序突然不再构建并出现此错误:
错误:com.google.common.util.concurrent 包不存在
导入 com.google.common.util.concurrent.ListenableFuture;
为什么突然这样?这在相当长的一段时间内运行良好。所有库都是最新的。我需要做什么才能再次编译?
更新:这是升级后发生的事情
implementation 'com.google.android.gms:play-services-ads:22.3.0'
到
implementation 'com.google.android.gms:play-services-ads:22.4.0'
回到22.3.0版本,一切都很好。这是广告库中的错误吗?不同库版本的一些奇怪的版本混合,可能有空间或其他什么?
如果需要,您可以添加显式依赖项
ListenableFuture
。
https://developer.android.com/guide/background/asynchronous/listenablefuture
dependencies {
implementation "com.google.guava:guava:31.0.1-android"
// To use CallbackToFutureAdapter
implementation "androidx.concurrent:concurrent-futures:1.1.0"
// Kotlin
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-guava:1.6.0"
}