java.lang.NullPointerException: Attempt to invoke virtual method 'org.json.JSONArrayorg.json.JSONObject.getJSONArray(java.lang.String)' on a null object reference at com.example.mind.sqlitedatabase.MainActivity$JSONParse.onPostExecute(MainActivity.java:134)

Stack Overflow | harsh | 7 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    json parsing using uri for listview in android

    Stack Overflow | 7 months ago | harsh
    java.lang.NullPointerException: Attempt to invoke virtual method 'org.json.JSONArrayorg.json.JSONObject.getJSONArray(java.lang.String)' on a null object reference at com.example.mind.sqlitedatabase.MainActivity$JSONParse.onPostExecute(MainActivity.java:134)

    Root Cause Analysis

    1. java.lang.NullPointerException

      Attempt to invoke virtual method 'org.json.JSONArrayorg.json.JSONObject.getJSONArray(java.lang.String)' on a null object reference at com.example.mind.sqlitedatabase.MainActivity$JSONParse.onPostExecute(MainActivity.java:134)

      at com.example.mind.sqlitedatabase.MainActivity$JSONParse.onPostExecute()
    2. com.example.mind
      MainActivity$JSONParse.onPostExecute
      1. com.example.mind.sqlitedatabase.MainActivity$JSONParse.onPostExecute(MainActivity.java:103)
      1 frame
    3. Android Platform
      ActivityThread.main
      1. android.os.AsyncTask.finish(AsyncTask.java:636)
      2. android.os.AsyncTask.access$500(AsyncTask.java:177)
      3. android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:653)
      4. android.os.Handler.dispatchMessage(Handler.java:102)
      5. android.os.Looper.loop(Looper.java:135)
      6. android.app.ActivityThread.main(ActivityThread.java:5254)
      6 frames
    4. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:372)
      2 frames
    5. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
      2 frames