2014-12-16 4 views
-2

안드로이드 용 야후 날씨 API를 사용하여 앱을 개발하고 싶습니다. 나는 현재 날씨와 일기 예보를 얻고 싶다.안드로이드에서 야후 날씨 API를 어떻게 활용할 수 있습니까?

다양한 소스 (예 : https://github.com/survivingwithandroid/WeatherLib, Getting error with Weatherlib API AndroidUnable to execute activity in android for weatherlib)에서 시도해 보았지만 다른 오류가 발생하여 재 게시 할 수 없습니다. 적절한 튜토리얼이나 가이드를 얻을 수있는 것이 있습니까?

오류 :

-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) 

genymotion AVD showing up no result enter image description here

로그 캣 메시지 :

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. 

감사합니다!

답변

관련 문제