gpt4 book ai didi

java - 未找到 com.google.common.util.concurrent.ListenableFuture 的 Android Studio 类文件

转载 作者:行者123 更新时间:2023-12-04 23:43:14 31 4
gpt4 key购买 nike

我无法构建我的项目,因为它失败了,因为它找不到类。我的 sdk 或依赖项有问题吗?
我已尝试使缓存无效并重新启动。我正在使用 api 29。
以下是出现错误的地方

public class PodcastUpdateWorker extends Worker {

}
这是错误打印输出
/home/snowman/AndroidStudioProjects/CorbettReportPodcasts/app/src/main/java/com/example/corbettreportpodcasts/PodcastUpdateWorker.java:36: error: cannot access ListenableFuture
public class PodcastUpdateWorker extends Worker {
^
class file for com.google.common.util.concurrent.ListenableFuture not found
和我的眷属
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.1'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'com.google.android.exoplayer:exoplayer-core:2.12.0'
implementation 'com.google.android.exoplayer:exoplayer-dash:2.12.0'
implementation 'com.google.android.exoplayer:exoplayer-ui:2.12.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
implementation 'androidx.legacy:legacy-preference-v14:1.0.0'
implementation "androidx.room:room-runtime:2.2.5"
annotationProcessor "androidx.room:room-compiler:2.2.5"
testImplementation "androidx.room:room-testing:2.2.5"
implementation 'androidx.work:work-runtime:2.4.0'
implementation 'com.google.android.material:material:1.2.1'
}
任何帮助表示赞赏

最佳答案

exoplayer 库与 listenablefuture 冲突存在问题,导致无法找到它。 READ MORE
你可以包括 Guava implementation 'com.google.guava:guava:29.0-android'解决这个问题

关于java - 未找到 com.google.common.util.concurrent.ListenableFuture 的 Android Studio 类文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64290141/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com