java.lang.NullPointerException

Attempt to invoke interface method 'int java.util.List.size()' 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 web129

  • via Stack Overflow by Satyam rathore
    ,
  • Stack trace

    • java.lang.NullPointerException: Attempt to invoke interface method 'int java.util.List.size()' on a null object reference at android.widget.ArrayAdapter.getCount(ArrayAdapter.java:330) at android.widget.ListView.setAdapter(ListView.java:499) at com.example.administrator.mainpage.MainActivity$JSONTask.onPostExecute(MainActivity.java:56) at com.example.administrator.mainpage.MainActivity$JSONTask.onPostExecute(MainActivity.java:41) at android.os.AsyncTask.finish(AsyncTask.java:636) at android.os.AsyncTask.access$500(AsyncTask.java:177) at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:653) at android.os.Handler.dispatchMessage(Handler.java:111) at android.os.Looper.loop(Looper.java:194) at android.app.ActivityThread.main(ActivityThread.java:5649) 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:959) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:754)

    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

    Unknown visitor
    Unknown visitorOnce,
    BardhBardh
    Once,
    Unknown visitor
    Unknown visitorOnce,
    RahulRahul
    Once,
    Unknown visitor
    Unknown visitorOnce,
    2 more bugmates