org.json.JSONException

Value Apache of type java.lang.String cannot be converted to JSONObject

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 web610

Stack trace

  • org.json.JSONException: Value Apache of type java.lang.String cannot be converted to JSONObject at org.json.JSON.typeMismatch(JSON.java:111) at org.json.JSONObject.<init>(JSONObject.java:158) at org.json.JSONObject.<init>(JSONObject.java:171) at com.example.testandroid.MainActivity.handleResponse(MainActivity.java:126) at com.example.testandroid.MainActivity$WebServiceTask.onPostExecute(MainActivity.java:238) at com.example.testandroid.MainActivity$WebServiceTask.onPostExecute(MainActivity.java:1)

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

justCodeitjustCodeit
7 times, last one
filpgamefilpgame
Once,
Hiren AmaliyarHiren Amaliyar
3 times, last one
Unknown UserUnknown User
16 times, last one
Indri YunitaIndri Yunita
4 times, last one
78 more bugmates