我使用的是Android studio 3.3.1,为glide导入了这些模块。

implementation 'com.github.bumptech.glide:glide:4.8.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
            .into(MainImage);
    
java
android
android-glide
Palash Jain
Palash Jain
发布于 2019-02-16
4 个回答
brady lee
brady lee
发布于 2022-03-23
已采纳
0 人赞同

If 幻灯片应用程序(GlideAPP不能生成

annotationProcessor com.github.bumptech.glide:compiler:4.9.0

必须与 "AppGlideModule实现类 "在同一模块中。

Yupi
Yupi
发布于 2022-03-23
0 人赞同

为了在Glide中使用生成的API,你需要创建一个类并扩展AppGlideModule和使用@GlideModule注释,例如。

import com.bumptech.glide.annotation.GlideModule;
import com.bumptech.glide.module.AppGlideModule;
@GlideModule
public final class MyAppGlideModule extends AppGlideModule {

在此重建后,你应该能够使用GlideApp,更多信息请访问。 http://bumptech.github.io/glide/doc/generatedapi.html

Karthikeyan G
Karthikeyan G
发布于 2022-03-23
0 人赞同
def glide_version = "4.12.0"
implementation "com.github.bumptech.glide:glide:$glide_version"
kapt "com.github.bumptech.glide:compiler:$glide_version"

Then Sync it will work.

Working Screenshot

可选:你也可以这样做。【替换代码1