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

Why mi logcat tab doesn't display the data migrated from JSON ?

Good afternoon

I'm stuck in this chapter because when i run my app stormy in the logcat tab should visualize as ben said the comment From JSON and the other data contained into like timezone, temperature, humidity, etc...however i don't get such result. I add my code generated in CurrentWheater class and the bundle of data thrown in logcat tab which isn't the expected result. Needless to say i'm not working with genymoution emulator though i'm currently working with an android studio emulator instead.

CurrentWheather class code:

package com.example.mario.stormy;

import java.text.SimpleDateFormat; import java.util.Date; import java.util.TimeZone;

/**

  • Created by Mario on 28/05/2016. */ public class CurrentWheater { private String mIcon; private long mTime; private double mTemperature; private double mHumidity; private double mPrecipChance; private String mSummary; private String mTimeZone;

    public String getTimeZone() { return mTimeZone; }

    public void setTimeZone(String TimeZone) { mTimeZone = TimeZone; }

    public String getIcon() { return mIcon; }

    public void setIcon(String Icon) { mIcon = Icon; }

    public long getTime() { return mTime; }

    public void setTime(long Time) { mTime = Time; }

    public double getTemperature() { return mTemperature; }

    public void setTemperature(double Temperature) { mTemperature = Temperature; }

    public double getHumidity() { return mHumidity; }

    public void setHumidity(double Humidity) { mHumidity = Humidity; }

    public double getPrecipChance() { return mPrecipChance; }

    public void setPrecipChance(double PrecipChance) { mPrecipChance = PrecipChance; }

    public String getSummary() { return mSummary; }

    public void setSummary(String Summary) { mSummary = Summary; } }

Logcat tab result:

05-31 22:22:33.322 2728-2728/com.example.mario.stormy W/System: ClassLoader referenced unknown path: /data/app/com.example.mario.stormy-1/lib/x86 05-31 22:22:41.711 2728-2728/com.example.mario.stormy W/System: ClassLoader referenced unknown path: /data/app/com.example.mario.stormy-1/lib/x86 05-31 22:22:42.421 2728-2734/com.example.mario.stormy W/art: Suspending all threads took: 84.711ms 05-31 22:22:42.843 2728-2734/com.example.mario.stormy W/art: Suspending all threads took: 6.218ms 05-31 22:22:43.111 2728-2728/com.example.mario.stormy W/art: Verification of void com.example.mario.stormy.MainActivity.onCreate(android.os.Bundle) took 248.489ms 05-31 22:22:43.445 2728-2734/com.example.mario.stormy W/art: Suspending all threads took: 104.385ms 05-31 22:22:43.896 2728-2734/com.example.mario.stormy W/art: Suspending all threads took: 56.211ms 05-31 22:22:44.876 2728-2734/com.example.mario.stormy W/art: Suspending all threads took: 534.487ms 05-31 22:22:45.716 2728-2734/com.example.mario.stormy W/art: Suspending all threads took: 251.520ms 05-31 22:22:45.977 2728-2734/com.example.mario.stormy W/art: Suspending all threads took: 18.698ms 05-31 22:22:46.837 2728-2728/com.example.mario.stormy W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable 05-31 22:22:47.197 2728-2734/com.example.mario.stormy W/art: Suspending all threads took: 237.093ms 05-31 22:22:47.520 2728-2734/com.example.mario.stormy W/art: Suspending all threads took: 53.381ms 05-31 22:22:48.044 2728-2734/com.example.mario.stormy W/art: Suspending all threads took: 82.170ms 05-31 22:22:48.492 2728-2734/com.example.mario.stormy W/art: Suspending all threads took: 30.088ms 05-31 22:22:48.539 2728-2728/com.example.mario.stormy D/MainActivity: Main UI app is running 05-31 22:22:48.543 2728-3082/com.example.mario.stormy D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true

                                                                    [ 05-31 22:22:48.545  2728: 2728 D/         ]
                                                                    HostConnection::get() New Host Connection established 0xaa926d70, tid 2728


                                                                    [ 05-31 22:22:48.588  2728: 3082 D/         ]
                                                                    HostConnection::get() New Host Connection established 0xaa926b30, tid 3082

05-31 22:22:48.591 2728-3082/com.example.mario.stormy I/OpenGLRenderer: Initialized EGL, version 1.4 05-31 22:22:49.064 2728-3082/com.example.mario.stormy V/RenderScript: 0xa1ff9000 Launching thread(s), CPUs 2 05-31 22:22:50.556 2728-3082/com.example.mario.stormy E/Surface: getSlotFromBufferLocked: unknown buffer: 0xaa1c3880 05-31 22:32:59.221 2728-2734/com.example.mario.stormy W/art: Suspending all threads took: 6.583ms 05-31 22:49:51.541 2728-2928/com.example.mario.stormy W/System: ClassLoader referenced unknown path: /data/data/com.example.mario.stormy/lib 05-31 22:49:51.620 2728-2728/com.example.mario.stormy D/MainActivity: Main UI app is running 05-31 22:49:51.637 2728-3082/com.example.mario.stormy E/Surface: getSlotFromBufferLocked: unknown buffer: 0xaa1c38f0 05-31 22:49:53.570 2728-3082/com.example.mario.stormy E/Surface: getSlotFromBufferLocked: unknown buffer: 0xaa1c37a0 05-31 22:49:55.565 2728-3082/com.example.mario.stormy E/Surface: getSlotFromBufferLocked: unknown buffer: 0xaa1c3880 05-31 22:50:48.307 27289-27289/com.example.mario.stormy W/System: ClassLoader referenced unknown path: /data/app/com.example.mario.stormy-1/lib/x86 05-31 22:50:50.200 27289-27289/com.example.mario.stormy W/System: ClassLoader referenced unknown path: /data/app/com.example.mario.stormy-1/lib/x86 05-31 22:50:50.294 27289-27289/com.example.mario.stormy W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable 05-31 22:50:50.335 27289-27289/com.example.mario.stormy D/MainActivity: Main UI app is running 05-31 22:50:50.341 27289-27345/com.example.mario.stormy D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true

                                                                      [ 05-31 22:50:50.347 27289:27289 D/         ]
                                                                      HostConnection::get() New Host Connection established 0xaa926980, tid 27289


                                                                      [ 05-31 22:50:50.387 27289:27345 D/         ]
                                                                      HostConnection::get() New Host Connection established 0xae5873f0, tid 27345

05-31 22:50:50.390 27289-27345/com.example.mario.stormy I/OpenGLRenderer: Initialized EGL, version 1.4 05-31 22:50:50.705 27289-27345/com.example.mario.stormy V/RenderScript: 0xa1fbe000 Launching thread(s), CPUs 2 05-31 22:50:52.351 27289-27345/com.example.mario.stormy E/Surface: getSlotFromBufferLocked: unknown buffer: 0xae5b8880 05-31 22:52:38.269 28727-28727/com.example.mario.stormy W/System: ClassLoader referenced unknown path: /data/app/com.example.mario.stormy-1/lib/x86 05-31 22:52:38.366 28727-28727/com.example.mario.stormy W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable 05-31 22:52:38.473 28727-28727/com.example.mario.stormy D/MainActivity: Main UI app is running 05-31 22:52:38.478 28727-28779/com.example.mario.stormy D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true

                                                                      [ 05-31 22:52:38.485 28727:28727 D/         ]
                                                                      HostConnection::get() New Host Connection established 0xaa926bc0, tid 28727


                                                                      [ 05-31 22:52:38.521 28727:28779 D/         ]
                                                                      HostConnection::get() New Host Connection established 0xaa926fb0, tid 28779

05-31 22:52:38.525 28727-28779/com.example.mario.stormy I/OpenGLRenderer: Initialized EGL, version 1.4 05-31 22:52:38.835 28727-28779/com.example.mario.stormy V/RenderScript: 0xaa939000 Launching thread(s), CPUs 2 05-31 22:52:40.500 28727-28779/com.example.mario.stormy E/Surface: getSlotFromBufferLocked: unknown buffer: 0xaa1c4c30 05-31 22:53:17.738 29323-29323/com.example.mario.stormy W/System: ClassLoader referenced unknown path: /data/app/com.example.mario.stormy-1/lib/x86 05-31 22:53:19.275 29323-29323/com.example.mario.stormy W/System: ClassLoader referenced unknown path: /data/app/com.example.mario.stormy-1/lib/x86 05-31 22:53:19.393 29323-29323/com.example.mario.stormy W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable 05-31 22:53:19.425 29323-29323/com.example.mario.stormy D/MainActivity: Main UI app is running 05-31 22:53:19.432 29323-29381/com.example.mario.stormy D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true

                                                                      [ 05-31 22:53:19.435 29323:29323 D/         ]
                                                                      HostConnection::get() New Host Connection established 0xaa926a40, tid 29323


                                                                      [ 05-31 22:53:19.470 29323:29381 D/         ]
                                                                      HostConnection::get() New Host Connection established 0xaa926f50, tid 29381

05-31 22:53:19.473 29323-29381/com.example.mario.stormy I/OpenGLRenderer: Initialized EGL, version 1.4 05-31 22:53:19.768 29323-29381/com.example.mario.stormy V/RenderScript: 0xaa90c000 Launching thread(s), CPUs 2 05-31 22:53:21.469 29323-29381/com.example.mario.stormy E/Surface: getSlotFromBufferLocked: unknown buffer: 0xaa1c4c30 05-31 22:54:55.900 30427-30427/com.example.mario.stormy W/System: ClassLoader referenced unknown path: /data/app/com.example.mario.stormy-1/lib/x86 05-31 22:54:57.641 30427-30427/com.example.mario.stormy W/System: ClassLoader referenced unknown path: /data/app/com.example.mario.stormy-1/lib/x86 05-31 22:54:57.734 30427-30427/com.example.mario.stormy W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable 05-31 22:54:57.769 30427-30427/com.example.mario.stormy D/MainActivity: Main UI app is running 05-31 22:54:57.774 30427-30481/com.example.mario.stormy D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true

                                                                      [ 05-31 22:54:57.779 30427:30427 D/         ]
                                                                      HostConnection::get() New Host Connection established 0xaa926800, tid 30427


                                                                      [ 05-31 22:54:57.822 30427:30481 D/         ]
                                                                      HostConnection::get() New Host Connection established 0xaa926c50, tid 30481

05-31 22:54:57.826 30427-30481/com.example.mario.stormy I/OpenGLRenderer: Initialized EGL, version 1.4 05-31 22:54:58.118 30427-30481/com.example.mario.stormy V/RenderScript: 0xa2031000 Launching thread(s), CPUs 2 05-31 22:54:59.788 30427-30481/com.example.mario.stormy E/Surface: getSlotFromBufferLocked: unknown buffer: 0xaa1c3730 05-31 23:05:01.526 7093-7093/com.example.mario.stormy W/System: ClassLoader referenced unknown path: /data/app/com.example.mario.stormy-1/lib/x86 05-31 23:05:03.238 7093-7093/com.example.mario.stormy W/System: ClassLoader referenced unknown path: /data/app/com.example.mario.stormy-1/lib/x86 05-31 23:05:03.380 7093-7093/com.example.mario.stormy W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable 05-31 23:05:03.416 7093-7093/com.example.mario.stormy D/MainActivity: Main UI app is running 05-31 23:05:03.422 7093-7145/com.example.mario.stormy D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true

                                                                    [ 05-31 23:05:03.425  7093: 7093 D/         ]
                                                                    HostConnection::get() New Host Connection established 0xaa926800, tid 7093


                                                                    [ 05-31 23:05:03.466  7093: 7145 D/         ]
                                                                    HostConnection::get() New Host Connection established 0xaa926c50, tid 7145

05-31 23:05:03.477 7093-7145/com.example.mario.stormy I/OpenGLRenderer: Initialized EGL, version 1.4 05-31 23:05:03.788 7093-7145/com.example.mario.stormy V/RenderScript: 0xaa90c000 Launching thread(s), CPUs 2 05-31 23:05:05.464 7093-7145/com.example.mario.stormy E/Surface: getSlotFromBufferLocked: unknown buffer: 0xaa1c3730 05-31 23:08:54.854 10390-10390/com.example.mario.stormy W/System: ClassLoader referenced unknown path: /data/app/com.example.mario.stormy-1/lib/x86 05-31 23:08:54.975 10390-10390/com.example.mario.stormy W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable 05-31 23:08:54.998 10390-10390/com.example.mario.stormy D/MainActivity: Main UI app is running 05-31 23:08:55.005 10390-10434/com.example.mario.stormy D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true

                                                                      [ 05-31 23:08:55.012 10390:10390 D/         ]
                                                                      HostConnection::get() New Host Connection established 0xaa926800, tid 10390


                                                                      [ 05-31 23:08:55.052 10390:10434 D/         ]
                                                                      HostConnection::get() New Host Connection established 0xaa926c50, tid 10434

05-31 23:08:55.056 10390-10434/com.example.mario.stormy I/OpenGLRenderer: Initialized EGL, version 1.4 05-31 23:08:55.353 10390-10434/com.example.mario.stormy V/RenderScript: 0xaa1be000 Launching thread(s), CPUs 2 05-31 23:08:57.038 10390-10434/com.example.mario.stormy E/Surface: getSlotFromBufferLocked: unknown buffer: 0xaa1c3730 05-31 23:10:52.446 11153-11153/com.example.mario.stormy W/System: ClassLoader referenced unknown path: /data/app/com.example.mario.stormy-1/lib/x86 05-31 23:10:52.577 11153-11153/com.example.mario.stormy W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable 05-31 23:10:52.600 11153-11153/com.example.mario.stormy D/MainActivity: Main UI app is running 05-31 23:10:52.604 11153-11191/com.example.mario.stormy D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true

                                                                      [ 05-31 23:10:52.607 11153:11153 D/         ]
                                                                      HostConnection::get() New Host Connection established 0xaa926ad0, tid 11153


                                                                      [ 05-31 23:10:52.655 11153:11191 D/         ]
                                                                      HostConnection::get() New Host Connection established 0xae587570, tid 11191

05-31 23:10:52.658 11153-11191/com.example.mario.stormy I/OpenGLRenderer: Initialized EGL, version 1.4 05-31 23:10:52.958 11153-11191/com.example.mario.stormy V/RenderScript: 0xa1ef4000 Launching thread(s), CPUs 2 05-31 23:10:54.610 11153-11191/com.example.mario.stormy E/Surface: getSlotFromBufferLocked: unknown buffer: 0xa27d7380 05-31 23:42:13.950 11854-11854/com.example.mario.stormy W/System: ClassLoader referenced unknown path: /data/app/com.example.mario.stormy-1/lib/x86 05-31 23:42:15.539 11854-11854/com.example.mario.stormy W/System: ClassLoader referenced unknown path: /data/app/com.example.mario.stormy-1/lib/x86 05-31 23:42:15.658 11854-11854/com.example.mario.stormy W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable 05-31 23:42:15.681 11854-11854/com.example.mario.stormy D/MainActivity: Main UI app is running 05-31 23:42:15.684 11854-11909/com.example.mario.stormy D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true

                                                                      [ 05-31 23:42:15.687 11854:11854 D/         ]
                                                                      HostConnection::get() New Host Connection established 0xaa926980, tid 11854


                                                                      [ 05-31 23:42:15.721 11854:11909 D/         ]
                                                                      HostConnection::get() New Host Connection established 0xaa926dd0, tid 11909

05-31 23:42:15.725 11854-11909/com.example.mario.stormy I/OpenGLRenderer: Initialized EGL, version 1.4 05-31 23:42:16.056 11854-11909/com.example.mario.stormy V/RenderScript: 0xa2036000 Launching thread(s), CPUs 2 05-31 23:42:17.699 11854-11909/com.example.mario.stormy E/Surface: getSlotFromBufferLocked: unknown buffer: 0xaa1c4c30 05-31 23:44:35.593 13918-13918/com.example.mario.stormy W/System: ClassLoader referenced unknown path: /data/app/com.example.mario.stormy-1/lib/x86 05-31 23:44:37.801 13918-13918/com.example.mario.stormy W/System: ClassLoader referenced unknown path: /data/app/com.example.mario.stormy-1/lib/x86 05-31 23:44:37.914 13918-13918/com.example.mario.stormy W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable 05-31 23:44:37.936 13918-13918/com.example.mario.stormy D/MainActivity: Main UI app is running 05-31 23:44:37.940 13918-13978/com.example.mario.stormy D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true

                                                                      [ 05-31 23:44:37.944 13918:13918 D/         ]
                                                                      HostConnection::get() New Host Connection established 0xaa926b90, tid 13918


                                                                      [ 05-31 23:44:37.987 13918:13978 D/         ]
                                                                      HostConnection::get() New Host Connection established 0xaa926e90, tid 13978

05-31 23:44:37.990 13918-13978/com.example.mario.stormy I/OpenGLRenderer: Initialized EGL, version 1.4 05-31 23:44:38.299 13918-13978/com.example.mario.stormy V/RenderScript: 0xaa1be000 Launching thread(s), CPUs 2 05-31 23:44:39.981 13918-13978/com.example.mario.stormy E/Surface: getSlotFromBufferLocked: unknown buffer: 0xaa1c4c30 05-31 23:44:44.613 13918-13924/com.example.mario.stormy W/art: Suspending all threads took: 6.894ms 05-31 23:48:20.123 13918-13978/com.example.mario.stormy E/Surface: getSlotFromBufferLocked: unknown buffer: 0xaa1c4ca0 05-31 23:53:41.472 21474-21474/com.example.mario.stormy W/System: ClassLoader referenced unknown path: /data/app/com.example.mario.stormy-1/lib/x86 05-31 23:53:43.157 21474-21474/com.example.mario.stormy W/System: ClassLoader referenced unknown path: /data/app/com.example.mario.stormy-1/lib/x86 05-31 23:53:43.270 21474-21474/com.example.mario.stormy W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable 05-31 23:53:43.291 21474-21474/com.example.mario.stormy D/MainActivity: Main UI app is running 05-31 23:53:43.298 21474-21526/com.example.mario.stormy D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true

                                                                      [ 05-31 23:53:43.301 21474:21474 D/         ]
                                                                      HostConnection::get() New Host Connection established 0xaa926800, tid 21474


                                                                      [ 05-31 23:53:43.338 21474:21526 D/         ]
                                                                      HostConnection::get() New Host Connection established 0xaa926c50, tid 21526

05-31 23:53:43.346 21474-21526/com.example.mario.stormy I/OpenGLRenderer: Initialized EGL, version 1.4 05-31 23:53:43.706 21474-21526/com.example.mario.stormy V/RenderScript: 0xa20b7000 Launching thread(s), CPUs 2 05-31 23:53:45.316 21474-21526/com.example.mario.stormy E/Surface: getSlotFromBufferLocked: unknown buffer: 0xaa1c3730 05-31 23:54:04.887 21857-21857/com.example.mario.stormy I/art: Not late-enabling -Xcheck:jni (already on) 05-31 23:54:05.024 21857-21857/com.example.mario.stormy W/ActivityThread: Application com.example.mario.stormy is waiting for the debugger on port 8100... 05-31 23:54:05.055 21857-21857/com.example.mario.stormy I/System.out: Sending WAIT chunk 05-31 23:54:06.055 21857-21863/com.example.mario.stormy I/art: Debugger is active 05-31 23:54:06.160 21857-21857/com.example.mario.stormy I/System.out: Debugger has connected 05-31 23:54:06.160 21857-21857/com.example.mario.stormy I/System.out: waiting for debugger to settle... 05-31 23:54:06.362 21857-21857/com.example.mario.stormy I/System.out: waiting for debugger to settle... 05-31 23:54:06.564 21857-21857/com.example.mario.stormy I/System.out: waiting for debugger to settle... 05-31 23:54:06.768 21857-21857/com.example.mario.stormy I/System.out: waiting for debugger to settle... 05-31 23:54:06.969 21857-21857/com.example.mario.stormy I/System.out: waiting for debugger to settle... 05-31 23:54:07.171 21857-21857/com.example.mario.stormy I/System.out: waiting for debugger to settle... 05-31 23:54:07.372 21857-21857/com.example.mario.stormy I/System.out: waiting for debugger to settle... 05-31 23:54:07.573 21857-21857/com.example.mario.stormy I/System.out: debugger has settled (1336) 05-31 23:54:07.610 21857-21857/com.example.mario.stormy W/System: ClassLoader referenced unknown path: /data/app/com.example.mario.stormy-1/lib/x86 05-31 23:54:09.304 21857-21857/com.example.mario.stormy W/System: ClassLoader referenced unknown path: /data/app/com.example.mario.stormy-1/lib/x86 05-31 23:54:09.477 21857-21857/com.example.mario.stormy W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable 05-31 23:54:09.510 21857-21857/com.example.mario.stormy D/MainActivity: Main UI app is running 05-31 23:54:09.517 21857-21914/com.example.mario.stormy D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true

                                                                      [ 05-31 23:54:09.519 21857:21857 D/         ]
                                                                      HostConnection::get() New Host Connection established 0xaa926d10, tid 21857


                                                                      [ 05-31 23:54:09.552 21857:21914 D/         ]
                                                                      HostConnection::get() New Host Connection established 0xae5873f0, tid 21914

05-31 23:54:09.558 21857-21914/com.example.mario.stormy I/OpenGLRenderer: Initialized EGL, version 1.4 05-31 23:54:09.846 21857-21914/com.example.mario.stormy V/RenderScript: 0xa1e7d000 Launching thread(s), CPUs 2 05-31 23:54:11.527 21857-21914/com.example.mario.stormy E/Surface: getSlotFromBufferLocked: unknown buffer: 0xa2692380 05-31 23:54:23.143 21857-21914/com.example.mario.stormy E/Surface: getSlotFromBufferLocked: unknown buffer: 0xa26923f0 06-01 00:08:57.094 21857-21863/com.example.mario.stormy W/art: Debugger attempted to resume all threads without having suspended them all before. 06-01 00:08:59.554 28366-28366/com.example.mario.stormy W/System: ClassLoader referenced unknown path: /data/app/com.example.mario.stormy-1/lib/x86 06-01 00:09:02.400 28366-28366/com.example.mario.stormy W/System: ClassLoader referenced unknown path: /data/app/com.example.mario.stormy-1/lib/x86 06-01 00:09:02.542 28366-28366/com.example.mario.stormy W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable 06-01 00:09:02.752 28366-28366/com.example.mario.stormy D/MainActivity: Main UI app is running 06-01 00:09:02.758 28366-28435/com.example.mario.stormy D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true

                                                                      [ 06-01 00:09:02.769 28366:28366 D/         ]
                                                                      HostConnection::get() New Host Connection established 0xaa9276a0, tid 28366


                                                                      [ 06-01 00:09:02.820 28366:28435 D/         ]
                                                                      HostConnection::get() New Host Connection established 0xae5874b0, tid 28435

06-01 00:09:02.827 28366-28435/com.example.mario.stormy I/OpenGLRenderer: Initialized EGL, version 1.4

Thanks in advance.

i also add my code in MainActivity.java class

package com.example.mario.stormy;

import android.app.DownloadManager; import android.content.Context; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.os.Bundle; import android.support.design.widget.FloatingActionButton; import android.support.design.widget.Snackbar; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.util.Log; import android.view.View; import android.view.Menu; import android.view.MenuItem; import android.widget.Toast;

import org.json.JSONException; import org.json.JSONObject;

import java.io.IOException;

import okhttp3.Call; import okhttp3.Callback; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response;

public class MainActivity extends AppCompatActivity {

public static final String TAG = MainActivity.class.getSimpleName();
private CurrentWheater mCurrentWheater;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    String apiKey = " 1f2797fd70b0fb0c614560bd5e123912";
    double latitud = 37.8267 ;
    double longitude = -122.423 ;
    String forecastURL = "https://api.forecast.io/forecast/" + apiKey +
                         "/" + latitud + " , " + longitude ;
    if(isNetworkAvailable()) {
        OkHttpClient client = new OkHttpClient();
        Request request = new Request.Builder()
                .url(forecastURL)
                .build();
        Call call = client.newCall(request);
        call.enqueue(new Callback() {
            @Override
            public void onFailure(Call call, IOException e) {

            }

            @Override
            public void onResponse(Call call, Response response) throws IOException {


                try {

                    String jsonData = response.body().string();
                    Log.v(TAG, jsonData );
                    if (response.isSuccessful()) {

                        mCurrentWheater = getCurrentDetails(jsonData);

                    } else {
                        alertUserAboutError();
                    }
                } catch (IOException e) {
                    Log.e(TAG, "Exception caught: ", e);
                }

                  catch (JSONException e){

                      Log.e(TAG, "Exception caught: ", e);
                  }
            }


        });
    }

    else {

        Toast.makeText(this, getString(R.string.network_unavailable_message), Toast.LENGTH_SHORT).show();
    }

    Log.d(TAG, "Main UI app is running ");
}

private CurrentWheater getCurrentDetails(String jsonData) throws JSONException {

    JSONObject forecast = new JSONObject(jsonData);
    String timezone = forecast.getString("timezone");
    Log.i(TAG, "From JSON: " + timezone );


    return new CurrentWheater();

}


private boolean isNetworkAvailable() {
    ConnectivityManager manager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
    NetworkInfo networkinfo = manager.getActiveNetworkInfo();
    boolean isAvailable = false;
    if(networkinfo != null && networkinfo.isConnected()){

        isAvailable = true;
    }

    return isAvailable;
}

private void alertUserAboutError() {

    AlertDialogFragment dialog = new  AlertDialogFragment();
    dialog.show(getFragmentManager(), "Error en la aplicaciĆ³n");
}

}