java.lang.IndexOutOfBoundsException(Invalid index 0, size is 0)
call GlideException#logRootCauses(String) for more detail
详细信息:
java.lang.IndexOutOfBoundsException(Invalid index 0, size is 0)
call GlideException#logRootCauses(String) for more detail
07-16 10:28:31.156 3343-3343/com.maiboparking.zhangxing.client.user.xianparking W/Glide: Load failed for http://dev-cub.changantingche.com/v4.0/picture/query/66f1ec66f53e46e2b676859d52398017 with size [879x1125]
class com.bumptech.glide.load.engine.GlideException: Failed to load resource
There was 1 cause:
java.lang.IndexOutOfBoundsException(Invalid index 0, size is 0)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 1): class java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
07-16 10:28:31.156 3343-3343/com.maiboparking.zhangxing.client.user.xianparking I/Glide: Root cause (1 of 1)
java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)
at java.util.ArrayList.get(ArrayList.java:308)
at java.util.Collections$UnmodifiableList.get(Collections.java:1050)
at com.bumptech.glide.load.engine.ResourceCacheGenerator.startNext(ResourceCacheGenerator.java:71)
at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:302)
at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:269)
at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:233)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:446)
07-16 10:28:31.157 3343-3343/com.maiboparking.zhangxing.client.user.xianparking W/Glide: Load failed for http://dev-cub.changantingche.com/v4.0/picture/query/66f1ec66f53e46e2b676859d52398017 with size [879x1125]
class com.bumptech.glide.load.engine.GlideException: Failed to load resource
There was 1 cause:
java.lang.IndexOutOfBoundsException(Invalid index 0, size is 0)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 1): class java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
07-16 10:28:31.158 3343-3343/com.maiboparking.zhangxing.client.user.xianparking I/Glide: Root cause (1 of 1)
java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)
at java.util.ArrayList.get(ArrayList.java:308)
at java.util.Collections$UnmodifiableList.get(Collections.java:1050)
at com.bumptech.glide.load.engine.ResourceCacheGenerator.startNext(ResourceCacheGenerator.java:71)
at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:302)
at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:269)
at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:233)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:446)
07-16 10:28:31.158 3343-3343/com.maiboparking.zhangxing.client.user.xianparking W/Glide: Load failed for http://dev-cub.changantingche.com/v4.0/picture/query/66f1ec66f53e46e2b676859d52398017 with size [879x1125]
class com.bumptech.glide.load.engine.GlideException: Failed to load resource
There was 1 cause:
java.lang.IndexOutOfBoundsException(Invalid index 0, size is 0)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 1): class java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
07-16 10:28:31.159 3343-3343/com.maiboparking.zhangxing.client.user.xianparking I/Glide: Root cause (1 of 1)
java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)
at java.util.ArrayList.get(ArrayList.java:308)
at java.util.Collections$UnmodifiableList.get(Collections.java:1050)
at com.bumptech.glide.load.engine.ResourceCacheGenerator.startNext(ResourceCacheGenerator.java:71)
at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:302)
at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:269)
at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:233)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:446)
android在使用gilde 4.8.0 加载图片的时候,原本都是好好的,然后我用了下glide的下载图片的功能,代码如下:
FutureTarget<File> target = Glide.with(LauncherActivity.this) .asFile().load(address) .submit();
File imageFile = target.get();
FilUtils.copy(imageFile,newFilePath);
这里是下载的图片,然后我在加载http的图片就加载不出来了,但是加载https的图片就可以正常显示。加载图片就的代码:
Glide.with(mContext).load(targetMsgBean.getMessagePicture()).into(iv);
http的图片加载不出来,https的图片可以加在出来,很诡异的问题,百度google搜索了半天无法解决。
然后我在吧上面下载图片的代码注释掉就可以正常显示了,问题很诡异。然后我修改上面代码:
FutureTarget<File> target = Glide.with(LauncherActivity.this).downloadOnly().load(address).submit();
添加 downloadOnly 就可以。不知道为什么。知道的麻烦说下