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

时间:2017-12-06 13:18:30

标签: android gradle android-glide

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

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'

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

    {
    "invoice_head": [
        {
            "number": 1, 
            "cliente": "Carlos", 
            "date": "2016-12-12"
        }, 
        {
            "number": 2, 
            "cliente": "Fernando", 
            "date": "2017-01-01"
        }
    ],
    "invoice_details": [
        {
            "headnumber": 1,
        "lineno": 1,
            "product": "Shoes", 
            "quantity": 2
        }, 
        {
            "headnumber": 1,
        "lineno": 2,
            "product": "Socks", 
            "quantity": 1
        },
    {
            "headnumber": 2,
        "lineno": 1,
            "product": "Laptop", 
            "quantity": 1
        }
    ],
}

编辑:我使用的是支持库版本27.0.1

5 个答案:

答案 0 :(得分:5)

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

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

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

答案 1 :(得分:2)

这可能是滑行问题所以,我希望到现在为止不要更新滑行到com.github.bumptech.glide:glide:4.4.0。您可以使用旧版本,例如com.github.bumptech.glide:glide:4.3.1com.github.bumptech.glide:glide:4.3.0com.github.bumptech.glide:glide:4.2.0

您可以在

上阅读有关这些问题的更多信息

issue 2318

issue 2319

答案 2 :(得分:0)

implementation 'com.github.bumptech.glide:glide:4.0.0-RC0'

一旦检查了最新的android studio 3.0.2的依赖关系,这个依赖关系构建了正确的gradle。

答案 3 :(得分:0)

只需在app.gradle中使用它,就可以完成:

compile 'com.github.bumptech.glide:glide:3.7.0'

答案 4 :(得分:-1)

您可以在构建中使用它。简单地:

dependencies {
implementation 'com.github.bumptech.glide:glide:4.4.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.4.0'
}
相关问题