GlideApp not found using LibraryGlideModule (Glide 4)

独自空忆成欢 提交于 2019-11-28 14:29:46

In your Android Studio: - Click menu Build - Clik Make Module

And GlideApp Class will automatically generated

  1. You need to create a new class MyAppGlideModule and extend AppGlideModule to it.

Refer the code below:

import com.bumptech.glide.annotation.GlideModule;
import com.bumptech.glide.module.AppGlideModule;
// new since Glide v4
@GlideModule
public final class MyAppGlideModule extends AppGlideModule {
    // leave empty for now
}
  1. Build -> Make Project
brady lee

If GlideAPP can't be generated

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

Must be with AppGlideModule Implementation class In the same module

You cannot use generated API (i.e. the GlideApp class) while using LibraryGlideModule. Reference: http://bumptech.github.io/glide/doc/generatedapi.html#availability

"The generated API is only available for applications for now." (i.e. only available for AppGlideModule)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!