android - 最新版本的 Glide 给出依赖错误

标签 android gradle android-glide

我已经将 Glide 的版本从 4.0.0-RC0 升级到 4.4.0。但它给我一个错误说

Error:Module 'com.github.bumptech.glide:glide:4.4.0' depends on one or more Android Libraries but is a jar

它没有说明哪个 jar 或任何其他信息。 有人知道如何解决这个问题吗?我还在我的 build.gradle 中附加了 Glide 的条目

compile 'com.github.bumptech.glide:glide:4.4.0'
compile 'com.github.bumptech.glide:okhttp3-integration:4.4.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.4.0'
compile 'com.github.bumptech.glide:annotations:4.4.0'

编辑:我正在使用支持库版本 27.0.1

最佳答案

我遇到了同样的问题,但是使用这个解决了它:

compile('com.github.bumptech.glide:glide:4.4.0@aar') {
    transitive = true;
}

要引入包含@GlideModule 的注解模块,你必须使用transitive = true

关于android - 最新版本的 Glide 给出依赖错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47675284/

相关文章:

android - 无法解析从本地源模块构建的本地 AAR

java - 分析 Gradle 项目

android - 节目类型已经存在 Glide

android - Android 只显示日期不显示时间

android 位置监听器不工作?

android - 无法构建项目,gradle 有问题吗?

android - 如何检查 Firebase 存储中是否存在图像?

android - 使用 android 和 ant 脚本构建应用程序

java - Eclipse logcat 调试

java - 使用实现而不是编译时无法访问库模块依赖项