java.lang.RuntimeException

Unable to destroy activity {com.smzf100.saomatuan/cn.finalteam.galleryfinal.PhotoSelectActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void java.util.ArrayList.clear()' on a null object reference

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web4

  • via GitHub by gmfbilu
    ,
  • via GitHub by ytwind
    ,
  • Stack trace

    • java.lang.RuntimeException: Unable to destroy activity {com.smzf100.saomatuan/cn.finalteam.galleryfinal.PhotoSelectActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void java.util.ArrayList.clear()' on a null object reference at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3916) at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3934) at android.app.ActivityThread.access$1400(ActivityThread.java:158) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1496) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5506) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:952) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:747) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void java.util.ArrayList.clear()' on a null object reference at cn.finalteam.galleryfinal.PhotoSelectActivity.onDestroy(PhotoSelectActivity.java:591) at android.app.Activity.performDestroy(Activity.java:6253) at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1164) at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3903) ... 10 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    We couldn't find other users who have seen this exception.