【发布时间】:2021-05-07 09:03:50
【问题描述】:
我已经阅读了很多关于此的其他帖子,并且我已经阅读了关于 Bumptech 的解释。但是我仍然没有点击。我有以下代码:
if (image != null) {
GlideApp
.with(this)
.load(imageUrl)
.centerCrop()
.transition(withCrossFade())
.into(eventImageView);
}
返回上述错误:Cannot Resolve Method 'with' in 'GlideApp'。
我按照这个问题的第一个答案:
Glide showing error: Failed to find GeneratedAppGlideModule
...但它似乎并没有改变任何东西:
import com.bumptech.glide.annotation.GlideModule;
import com.bumptech.glide.module.AppGlideModule;
@GlideModule
public class GlideApp extends AppGlideModule {
}
最后是我的应用 build.gradle:
implementation ("com.github.bumptech.glide:glide:4.11.0") {
exclude group: "com.android.support"
}
annotationProcessor 'androidx.annotation:annotation:1.1.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
implementation ("com.github.bumptech.glide:glide:4.11.0@aar") {
transitive = true
}
不明白为什么 Glide 突然变得这么复杂……
【问题讨论】:
标签: android android-glide