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) Hooking Up the Model to the View Plugging in the Data

Not getting updated data

after adding the "updateDisplay()" method app does not show any error.and on adding run on main thread method nothing gets updated it still shows the same as the previous interface

aakarshrestha
aakarshrestha
6,509 Points

Put your code in here... without looking at the code, it is quite difficult to answer the question.

Happy Coding!

pranav kakkad
pranav kakkad
755 Points

04-03 00:24:50.574 5184-5448/com.example.pranav.stormy E/MainActivity: Exception Caught: org.json.JSONException: No value for Precipitation Chance at org.json.JSONObject.get(JSONObject.java:389) at org.json.JSONObject.getDouble(JSONObject.java:444) at com.example.pranav.stormy.MainActivity.getCurrentDetails(MainActivity.java:175) at com.example.pranav.stormy.MainActivity.access$400(MainActivity.java:35) at com.example.pranav.stormy.MainActivity$2.onResponse(MainActivity.java:111) 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)

see here is the code, It issaying that is not getting any value. how to reaolve it?

2 Answers

You may want to go one step back and reconfigure your ButterKnife to make your updateDisplay method do somthing with the UI. It's a little tricky, but it works.

https://teamtreehouse.com/community/bind-cannot-resolve-symbol-bindview-in-butterknife

Make sure that your JSONObject variables are set up correctly.