升级到最新的 AndroidX 库和 Android Gradle 插件后,当我在我的项目上运行 lint 时,lint 构建失败。
这一切都始于最新的 Android Gradle 插件抱怨程序类型已经存在:com.google.common.util.concurrent.ListenableFuture 在构建我的项目时
以下是错误:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:lint'.
> Could not resolve all artifacts for configuration ':app:debugAndroidTestRuntimeClasspath'.
> Could not resolve com.google.guava:guava:23.6-android.
Required by:
project :app
> Cannot find a version of 'com.google.guava:guava' that satisfies the version constraints:
Dependency path 'Code Base:app:unspecified' --> 'androidx.test.ext:truth:1.1.0' --> 'com.google.guava:guava:26.0-android'
Dependency path 'Code Base:app:unspecified' --> 'com.google.truth:truth:0.42' --> 'com.google.guava:guava:25.1-android'
Dependency path 'Code Base:app:unspecified' …Run Code Online (Sandbox Code Playgroud)