android - 在 glide 库 v4.8.0 中没有缓存版本的 xxxcompiler:4.8.0 可用于离线模式错误
问题描述
我成功地将 glide 4.8.0 库添加到我的 android studio 项目中。但是当我检查 gradle 离线工作并运行项目时,我遇到了这个错误:
“没有可用于离线模式的 com.github.bumptech.glide:compiler:4.8.0 的缓存版本”。禁用 Gradle“离线模式”并同步项目
我希望 gradle 保持离线工作模式。我在 build.gradle(app level) 中将 glide 库添加到我的项目中,如下所示:
implementation 'com.github.bumptech.glide:glide:4.8.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
build.gradle 的项目级别是:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenCentral()
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
解决方案
您是否尝试过禁用离线模式然后重新构建,构建完成后您再次启用离线模式。
推荐阅读
- jmeter - jmeter 请求和响应代码
- python - 如何在有条件的情况下获得假人
- r - 将超链接从 HTML 单元格 - 表格转换为 R 中的文本行
- google-cloud-platform - 我们可以使用云发布/订阅接收多个用户到同一推送端点的 gmail 推送通知吗
- c# - 无法在 Unity 中订购 Firebase 数据。C#
- angular - 角度“ngif”在获取未定义值时不起作用
- android - Android - 如何使用 asynctask android 让标头响应
- java-8 - Stream 类型中的方法 collect(Collector )
不适用于参数(收集器 ) - angular - 在输入占位符文本中使用 Angular fontawesome 图标
- python - 在 python 本地主机服务器上进行测试将我带到目录