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) Concurrency and Error Handling What To Do When the Network is Down

Jake ming
Jake ming
1,151 Points

question about building an weather app

hello everyone ! just run into some problems when learning the building an android app. after i added the alert dialog class and alert dialog my app started to crash. this video is pretty old like four years ago? i know this gotta be the okhttp issue because when i turn on the airplane mode in my phone the app just stop to crash. and tree house people plz update your video!!! and replace the shitty work space that thing is not thing close to a modern ide just painful to use.

here is the logcat info thanks !!! guys

12-21 05:26:44.326 13083-13100/c.abc.myapplication2333 E/AndroidRuntime: FATAL EXCEPTION: OkHttp Dispatcher Process: c.abc.myapplication2333, PID: 13083 java.lang.IllegalStateException: closed at okio.RealBufferedSource.rangeEquals(RealBufferedSource.java:398) at okio.RealBufferedSource.rangeEquals(RealBufferedSource.java:392) at okhttp3.internal.Util.bomAwareCharset(Util.java:449) at okhttp3.ResponseBody.string(ResponseBody.java:174) at c.abc.myapplication2333.MainActivity$1.onResponse(MainActivity.java:51) at okhttp3.RealCall$AsyncCall.execute(RealCall.java:153) at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) at java.lang.Thread.run(Thread.java:764)