Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Build a Weather App (2015) Working with JSON Introducing JSONObject

pranav kakkad
pranav kakkad
755 Points

Showing error

04-02 12:47:22.310 15880-18801/? E/MainActivity: Exception caught org.json.JSONException: Value okhttp3.internal.http.RealResponseBody@866d03f 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:160) at org.json.JSONObject.<init>(JSONObject.java:173) at com.example.pranav.stormy.MainActivity.getCurrentDetails(MainActivity.java:79) at com.example.pranav.stormy.MainActivity.access$100(MainActivity.java:24) at com.example.pranav.stormy.MainActivity$1.onResponse(MainActivity.java:57) at okhttp3.RealCall$AsyncCall.execute(RealCall.java:135) at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) at java.lang.Thread.run(Thread.java:818)

IT is showing this type of error in android monitor.How to resolve it?

What type of problem or you experiencing?