Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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)