Glide无法加载服务器映像url
试图加载像这样的类似url的图像
"https://firebasestorage.googleapis.com/v0/b/content-office-e1931.appspot.com/o/usersData%2Fposts%2Fmedia_-KpGAURJbB33BKhTynV1?alt=media&token=26135949-a918-4572-9293-b639d43f04aa"
但滑翔显示日志
Load failed for with size [360x360] class com.bumptech.glide.load.engine.GlideException: Failed to load resource class com.bumptech.glide.load.engine.GlideException: Failed to load resource
先前的日志
Failed to find GeneratedAppGlideModule. You should include an annotationProcessor compile dependency on com.github.bumptech.glide:glide:compiler in your application and a @GlideModule annotated AppGlideModule implementation or LibraryGlideModules will be silently ignored
我不明白为什么我应该添加AppGlideModule等只是为了加载图像。 我在Kotlin的代码,我已经添加了编译器依赖如下
//image loader compile 'com.github.bumptech.glide:glide:4.0.0-RC1' kapt 'com.github.bumptech.glide:compiler:4.0.0-RC1'
这是我如何称之为滑翔
fun bind(post: Post) { for ((k, v) in post.media) { Glide.with(itemView.context) .asBitmap() .apply(RequestOptions.encodeQualityOf(70)) .apply(RequestOptions.overrideOf(width,width)) .apply(RequestOptions.centerCropTransform()) .load(v.downloadPath) .into(image) } }
我曾尝试附加一个侦听器来查看日志,当Glide尝试加载图像时发生了什么,但我只看到“无法加载资源”没有用处
它正在与我合作:
Glide.with(itemView.context) .load(new URL(v.downloadPath)) .into(image);