java.lang.RuntimeException: Unable to resume activity {com.android.IPM/com.lzy.imagepicker.ui.ImageGridActivity}: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3505)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3545)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1578)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6245)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:900)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:790)
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.get(ArrayList.java:411)
at com.lzy.imagepicker.b.a(Unknown Source)
at com.lzy.imagepicker.b.a(Unknown Source)
at android.support.v4.app.LoaderManagerImpl$b.a(Unknown Source)
at android.arch.lifecycle.LiveData.a(Unknown Source)
at android.arch.lifecycle.LiveData.b(Unknown Source)
at android.arch.lifecycle.LiveData.b(Unknown Source)
at android.arch.lifecycle.j.b(Unknown Source)
at android.support.v4.app.LoaderManagerImpl$a.b(Unknown Source)
at android.support.v4.app.LoaderManagerImpl$a.a(Unknown Source)
at android.support.v4.content.e.b(Unknown Source)
at android.support.v4.content.d.a(Unknown Source)
at android.support.v4.content.d.i(Unknown Source)
at android.support.v4.content.e.q(Unknown Source)
at android.support.v4.app.LoaderManagerImpl$a.b(Unknown Source)
at android.arch.lifecycle.LiveData$a.a(Unknown Source)
at android.arch.lifecycle.LiveData$LifecycleBoundObserver.a(Unknown Source)
at android.arch.lifecycle.f$a.a(Unknown Source)
at android.arch.lifecycle.f.a(Unknown Source)
at android.arch.lifecycle.f.d(Unknown Source)
at android.arch.lifecycle.f.b(Unknown Source)
at android.arch.lifecycle.f.a(Unknown Source)
at android.arch.lifecycle.m.a(Unknown Source)
at android.arch.lifecycle.m.onStart(Unknown Source)
at android.app.Fragment.performStart(Fragment.java:2379)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1027)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1171)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1153)
at android.app.FragmentManagerImpl.dispatchStart(FragmentManager.java:2044)
at android.app.FragmentController.dispatchStart(FragmentController.java:187)
at android.app.Activity.performStart(Activity.java:6849)
at android.app.Activity.performRestart(Activity.java:6917)
at android.app.Activity.performResume(Activity.java:6922)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3482)
... 8 more
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.get(ArrayList.java:411)
at com.lzy.imagepicker.b.a(Unknown Source)
at com.lzy.imagepicker.b.a(Unknown Source)
at android.support.v4.app.LoaderManagerImpl$b.a(Unknown Source)
at android.arch.lifecycle.LiveData.a(Unknown Source)
at android.arch.lifecycle.LiveData.b(Unknown Source)
at android.arch.lifecycle.LiveData.b(Unknown Source)
at android.arch.lifecycle.j.b(Unknown Source)
at android.support.v4.app.LoaderManagerImpl$a.b(Unknown Source)
at android.support.v4.app.LoaderManagerImpl$a.a(Unknown Source)
at android.support.v4.content.e.b(Unknown Source)
at android.support.v4.content.d.a(Unknown Source)
at android.support.v4.content.d.i(Unknown Source)
at android.support.v4.content.e.q(Unknown Source)
at android.support.v4.app.LoaderManagerImpl$a.b(Unknown Source)
at android.arch.lifecycle.LiveData$a.a(Unknown Source)
at android.arch.lifecycle.LiveData$LifecycleBoundObserver.a(Unknown Source)
at android.arch.lifecycle.f$a.a(Unknown Source)
at android.arch.lifecycle.f.a(Unknown Source)
at android.arch.lifecycle.f.d(Unknown Source)
at android.arch.lifecycle.f.b(Unknown Source)
at android.arch.lifecycle.f.a(Unknown Source)
at android.arch.lifecycle.m.a(Unknown Source)
at android.arch.lifecycle.m.onStart(Unknown Source)
at android.app.Fragment.performStart(Fragment.java:2379)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1027)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1171)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1153)
at android.app.FragmentManagerImpl.dispatchStart(FragmentManager.java:2044)
at android.app.FragmentController.dispatchStart(FragmentController.java:187)
at android.app.Activity.performStart(Activity.java:6849)
at android.app.Activity.performRestart(Activity.java:6917)
at android.app.Activity.performResume(Activity.java:6922)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3482)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3545)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1578)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6245)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:900)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:790)
java.lang.RuntimeException: Unable to resume activity {com.android.IPM/com.lzy.imagepicker.ui.ImageGridActivity}: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3505) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3545) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1578) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6245) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:900) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:790) Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.get(ArrayList.java:411) at com.lzy.imagepicker.b.a(Unknown Source) at com.lzy.imagepicker.b.a(Unknown Source) at android.support.v4.app.LoaderManagerImpl$b.a(Unknown Source) at android.arch.lifecycle.LiveData.a(Unknown Source) at android.arch.lifecycle.LiveData.b(Unknown Source) at android.arch.lifecycle.LiveData.b(Unknown Source) at android.arch.lifecycle.j.b(Unknown Source) at android.support.v4.app.LoaderManagerImpl$a.b(Unknown Source) at android.support.v4.app.LoaderManagerImpl$a.a(Unknown Source) at android.support.v4.content.e.b(Unknown Source) at android.support.v4.content.d.a(Unknown Source) at android.support.v4.content.d.i(Unknown Source) at android.support.v4.content.e.q(Unknown Source) at android.support.v4.app.LoaderManagerImpl$a.b(Unknown Source) at android.arch.lifecycle.LiveData$a.a(Unknown Source) at android.arch.lifecycle.LiveData$LifecycleBoundObserver.a(Unknown Source) at android.arch.lifecycle.f$a.a(Unknown Source) at android.arch.lifecycle.f.a(Unknown Source) at android.arch.lifecycle.f.d(Unknown Source) at android.arch.lifecycle.f.b(Unknown Source) at android.arch.lifecycle.f.a(Unknown Source) at android.arch.lifecycle.m.a(Unknown Source) at android.arch.lifecycle.m.onStart(Unknown Source) at android.app.Fragment.performStart(Fragment.java:2379) at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1027) at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1171) at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1153) at android.app.FragmentManagerImpl.dispatchStart(FragmentManager.java:2044) at android.app.FragmentController.dispatchStart(FragmentController.java:187) at android.app.Activity.performStart(Activity.java:6849) at android.app.Activity.performRestart(Activity.java:6917) at android.app.Activity.performResume(Activity.java:6922) at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3482) ... 8 more java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.get(ArrayList.java:411) at com.lzy.imagepicker.b.a(Unknown Source) at com.lzy.imagepicker.b.a(Unknown Source) at android.support.v4.app.LoaderManagerImpl$b.a(Unknown Source) at android.arch.lifecycle.LiveData.a(Unknown Source) at android.arch.lifecycle.LiveData.b(Unknown Source) at android.arch.lifecycle.LiveData.b(Unknown Source) at android.arch.lifecycle.j.b(Unknown Source) at android.support.v4.app.LoaderManagerImpl$a.b(Unknown Source) at android.support.v4.app.LoaderManagerImpl$a.a(Unknown Source) at android.support.v4.content.e.b(Unknown Source) at android.support.v4.content.d.a(Unknown Source) at android.support.v4.content.d.i(Unknown Source) at android.support.v4.content.e.q(Unknown Source) at android.support.v4.app.LoaderManagerImpl$a.b(Unknown Source) at android.arch.lifecycle.LiveData$a.a(Unknown Source) at android.arch.lifecycle.LiveData$LifecycleBoundObserver.a(Unknown Source) at android.arch.lifecycle.f$a.a(Unknown Source) at android.arch.lifecycle.f.a(Unknown Source) at android.arch.lifecycle.f.d(Unknown Source) at android.arch.lifecycle.f.b(Unknown Source) at android.arch.lifecycle.f.a(Unknown Source) at android.arch.lifecycle.m.a(Unknown Source) at android.arch.lifecycle.m.onStart(Unknown Source) at android.app.Fragment.performStart(Fragment.java:2379) at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1027) at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1171) at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1153) at android.app.FragmentManagerImpl.dispatchStart(FragmentManager.java:2044) at android.app.FragmentController.dispatchStart(FragmentController.java:187) at android.app.Activity.performStart(Activity.java:6849) at android.app.Activity.performRestart(Activity.java:6917) at android.app.Activity.performResume(Activity.java:6922) at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3482) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3545) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1578) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6245) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:900) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:790)