急急急-----com.lzy.imagepicker.ui.ImageGridActivity: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
jianglan666 opened this issue · comments
能不能赶紧改一下这个问题呀?急急急
预览返回就报这个错硬是没想通这什么鬼
同样碰到这个问题,解决了没有
同样碰到这个问题,怎么解决?
+1,看了源码也没发现有index问题。。。
从 fragment 打开 相册,点击图片 预览 准备 退出时, 会引起onLoadFinished回调 , 然后 报数组越界
从 activity 打开 相册,点击图片 预览 准备 退出时, 不会引起onLoadFinished回调 ,正常退出
依赖 和 源码的代码 是不一样的
拽的源码 自己改的,等不了了。
直接把源码拷贝到工程还是不行,但是demo是没有问题的。
弃用
期待作者更新
作者不更新了,交给别人更新了,不是自己代码就不当一回事。。虾鸡八搞,连这种低级错误都能犯。。。。
遇到了同样的问题
com.lzy.imagepicker.ui.ImageGridActivity: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
哎!!!
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.get(ArrayList.java:437)
at com.lzy.imagepicker.ImageDataSource.onLoadFinished(ImageDataSource.java:124)
at com.lzy.imagepicker.ImageDataSource.onLoadFinished(ImageDataSource.java:27)
at android.support.v4.app.LoaderManagerImpl$LoaderObserver.onChanged(LoaderManagerImpl.java:250)
at android.arch.lifecycle.LiveData.considerNotify(LiveData.java:109)
at android.arch.lifecycle.LiveData.dispatchingValue(LiveData.java:126)
at android.arch.lifecycle.LiveData.setValue(LiveData.java:282)
at android.arch.lifecycle.MutableLiveData.setValue(MutableLiveData.java:33)
at android.support.v4.app.LoaderManagerImpl$LoaderInfo.setValue(LoaderManagerImpl.java:189)
at android.support.v4.app.LoaderManagerImpl$LoaderInfo.onLoadComplete(LoaderManagerImpl.java:174)
at android.support.v4.content.Loader.deliverResult(Loader.java:132)
at android.support.v4.content.CursorLoader.deliverResult(CursorLoader.java:109)
at android.support.v4.content.CursorLoader.onStartLoading(CursorLoader.java:155)
at android.support.v4.content.Loader.startLoading(Loader.java:285)
at android.support.v4.app.LoaderManagerImpl$LoaderInfo.onActive(LoaderManagerImpl.java:77)
at android.arch.lifecycle.LiveData$ObserverWrapper.activeStateChanged(LiveData.java:410)
at android.arch.lifecycle.LiveData$LifecycleBoundObserver.onStateChanged(LiveData.java:368)
at android.arch.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.java:354)
at android.arch.lifecycle.LifecycleRegistry.forwardPass(LifecycleRegistry.java:292)
at android.arch.lifecycle.LifecycleRegistry.sync(LifecycleRegistry.java:332)
at android.arch.lifecycle.LifecycleRegistry.moveToState(LifecycleRegistry.java:137)
at android.arch.lifecycle.LifecycleRegistry.handleLifecycleEvent(LifecycleRegistry.java:123)
at android.arch.lifecycle.ReportFragment.dispatch(ReportFragment.java:121)
at android.arch.lifecycle.ReportFragment.onStart(ReportFragment.java:81)
at android.app.Fragment.performStart(Fragment.java:2534)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1315)
at android.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1562)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1623)
at android.app.FragmentManagerImpl.dispatchMoveToState(FragmentManager.java:3032)
at android.app.FragmentManagerImpl.dispatchStart(FragmentManager.java:2989)
at android.app.FragmentController.dispatchStart(FragmentController.java:189)
at android.app.Activity.performStart(Activity.java:7106)
at android.app.Activity.performRestart(Activity.java:7175)
at android.app.Activity.performResume(Activity.java:7180)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3618)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3683)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1687)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:171)
at android.app.ActivityThread.main(ActivityThread.java:6642)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:518)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
艾玛,我也遇到了, 作者一年多不更新了,看来是要 弃库 了
建议直接拿源码引用把 我刚拿的源码 没有那个问题了
果断放弃了
有点伤
关于以上问题我提了ISSUES并发了解决办法遇到的同学可以去看看
能不能赶紧改一下这个问题呀?急急急
index问题可以引用这个库,我发布了一下,顺便改了这个bug
implementation 'com.github.Jimmuy:ImagePicker:v1.0.2'
我也是服了,找了好久才找到这篇帖子 可是网上的都不是这个1.0.2的版本显示,僵硬!!!
不过确实改完就能用了 不会crash 了 感谢