Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
533 views
in Technique[技术] by (71.8m points)

android - Glide cannot resolve asBitmap()

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);

My gradle :-

compile 'com.github.bumptech.glide:glide:4.0.0'
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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

PS: my Glide Version is 4.7.1


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...