Glide无法解析asBitmap() [英] Glide cannot resolve asBitmap()

查看:3965
本文介绍了Glide无法解析asBitmap()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么在使用Glide时无法解析此方法,也无法解析.diskstaretegy():

Why I can't resolve this method while using Glide also I can't resolve .diskstaretegy() :

Glide.with(getActivity())
                .load(chalet.profilePhoto)
                .asBitmap() <--- cannot resolve this
                .diskCacheStrategy(DiskCacheStrategy.ALL) <--- cannot reslove this
                .fitCenter()
                .placeholder(R.drawable.logo).dontAnimate().into(mImageView);

我的礼物:-

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

推荐答案

我找到了解决方法,必须在with()之后添加asBitmap(),它才能像以前一样工作.

I found the way to fix it, you must add the asBitmap() right After with() and it will work just like old times.

PS:我的Glide版本是4.7.1

PS: my Glide Version is 4.7.1

这篇关于Glide无法解析asBitmap()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆