项目中原本是用的Glide3.7.0,一切功能正常,但是集成了网易云信的UIKIT后,就出问题了,发现是Glide4.0的问题。

Glide4.0,始终会报这么一个错,就算是最简单的加载也仍然报错。

"void com.bumptech.glide.module.RegistersComponents.registerComponents(android.content.Context, com.bumptech.glide.Glide, com.bumptech.glide.Registry)"

 

查阅官方文档发现说要添加一个AppGlideModule类

 

@GlideModule
public class MyAppGlideModule extends AppGlideModule {
}

 

 

添加后,仍然出错!

差了很多文章,最后还是在这里找到了答案:https://stackoverflow.com/questions/47327760/glide-crash-because-of-context-4-3-1/47330015

需要在上面的类里面重载这个方法,终于搞定!

 

   @Override
   public boolean isManifestParsingEnabled() {
      return false;
   }
 

相关文章:

  • 2021-12-20
  • 2022-12-23
  • 2022-12-23
  • 2021-08-15
  • 2022-12-23
  • 2022-02-11
  • 2021-11-10
  • 2021-04-15
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-18
  • 2021-10-09
  • 2022-12-23
  • 2021-10-09
相关资源
相似解决方案