title: How can I utilize Yahoo Weather API in android
body: <p>I want to develop an app using Yahoo Weather API for android. I want to get current and forecast weather details.</p>
  
  <p>I have tried it from different sources (e.g.:<a href="https://github.com/survivingwithandroid/WeatherLib" rel="nofollow noreferrer">https://github.com/survivingwithandroid/WeatherLib</a>, <a href="https://stackoverflow.com/questions/27458149/getting-error-with-weatherlib-api-android">Getting error with Weatherlib API Android</a> and <a href="https://stackoverflow.com/questions/27481420/unable-to-execute-activity-in-android-for-weatherlib">Unable to execute activity in android for weatherlib</a>) and getting different errors which I M Unable to resplve. Is there anything that I can get a proper tutorial or guide! </p>
  
  <p>Error:</p>
  
  <pre><code>-17 08:50:48.961    3168-3168/com.survivingwithandroid.weather E/AndroidRuntime﹕ FATAL EXCEPTION: main
  Process: com.survivingwithandroid.weather, PID: 3168
  java.lang.RuntimeException: Unable to start activity ComponentInfo{com.survivingwithandroid.weather/com.survivingwithandroid.weather.MainActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'boolean java.util.List.isEmpty()' on a null object reference
          at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2298)
          at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
          at android.app.ActivityThread.access$800(ActivityThread.java:144)
          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
          at android.os.Handler.dispatchMessage(Handler.java:102)
          at android.os.Looper.loop(Looper.java:135)
          at android.app.ActivityThread.main(ActivityThread.java:5221)
          at java.lang.reflect.Method.invoke(Native Method)
          at java.lang.reflect.Method.invoke(Method.java:372)
          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
   Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'boolean java.util.List.isEmpty()' on a null object reference
          at com.survivingwithandroid.weather.billing.util.IabHelper.startSetup(IabHelper.java:267)
          at com.survivingwithandroid.weather.MainActivity.onCreate(MainActivity.java:95)
          at android.app.Activity.performCreate(Activity.java:5933)
          at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
          at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251)
          at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
          at android.app.ActivityThread.access$800(ActivityThread.java:144)
          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
          at android.os.Handler.dispatchMessage(Handler.java:102)
          at android.os.Looper.loop(Looper.java:135)
          at android.app.ActivityThread.main(ActivityThread.java:5221)
          at java.lang.reflect.Method.invoke(Native Method)
          at java.lang.reflect.Method.invoke(Method.java:372)
          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/ykKSq.png" alt="genymotion AVD showing up no result">
  <img src="https://i.stack.imgur.com/8qT60.png" alt="enter image description here"></p>
  
  <p>LogCat Messages:</p>
  
  <pre><code>12-18 09:37:40.866    1648-1648/com.survivingwithandroid.weather D/SwA﹕ onCreate
  12-18 09:37:41.721    1648-1663/com.survivingwithandroid.weather I/art﹕ Background sticky concurrent mark sweep GC freed 1784(95KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 2MB/2MB, paused 16.214ms total 80.155ms
  12-18 09:37:41.965    1648-1663/com.survivingwithandroid.weather I/art﹕ Background partial concurrent mark sweep GC freed 79(16KB) AllocSpace objects, 0(0B) LOS objects, 39% free, 2MB/3MB, paused 3.978ms total 238.766ms
  12-18 09:37:42.494    1648-1648/com.survivingwithandroid.weather D/IabHelper﹕ Starting in-app billing setup.
  12-18 09:37:42.698    1648-1672/com.survivingwithandroid.weather D/OpenGLRenderer﹕ Render dirty regions requested: true
      12-18 09:37:42.772    1648-1648/com.survivingwithandroid.weather D/﹕ HostConnection::get() New Host Connection established 0xb04630c0, tid 1648
     12-18 09:37:43.000    1648-1648/com.survivingwithandroid.weather D/Atlas﹕ Validating map...
  12-18 09:37:43.240    1648-1672/com.survivingwithandroid.weather D/libEGL﹕ loaded /system/lib/egl/libEGL_emulation.so
  12-18 09:37:43.451    1648-1672/com.survivingwithandroid.weather D/libEGL﹕ loaded /system/lib/egl/libGLESv1_CM_emulation.so
  12-18 09:37:43.473    1648-1672/com.survivingwithandroid.weather D/libEGL﹕ loaded /system/lib/egl/libGLESv2_emulation.so
      12-18 09:37:43.502    1648-1672/com.survivingwithandroid.weather D/﹕ HostConnection::get() New Host Connection established 0xafc1b770, tid 1672
       12-18 09:37:43.548    1648-1672/com.survivingwithandroid.weather I/OpenGLRenderer﹕ Initialized EGL, version 1.4
      12-18 09:37:43.643    1648-1672/com.survivingwithandroid.weather D/OpenGLRenderer﹕ Enabling debug mode 0
      12-18 09:37:43.663    1648-1672/com.survivingwithandroid.weather W/EGL_emulation﹕ eglSurfaceAttrib not implemented
      12-18 09:37:43.663    1648-1672/com.survivingwithandroid.weather W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xafc07ee0, error=EGL_SUCCESS
      12-18 09:37:43.939    1648-1672/com.survivingwithandroid.weather W/EGL_emulation﹕ eglSurfaceAttrib not implemented
      12-18 09:37:43.939    1648-1672/com.survivingwithandroid.weather W/OpenGLRenderer﹕ Failed to set EGL_SWAP_BEHAVIOR on surface 0xafc07f00, error=EGL_SUCCESS
      12-18 09:37:43.973    1648-1648/com.survivingwithandroid.weather I/Choreographer﹕ Skipped 35 frames!  The application may be doing too much work on its main thread.
  </code></pre>
  
  <p>Thanks!</p>