-2

Android用のYahoo Weather APIを使用してアプリを開発したいと考えています。現在と天気予報の詳細を取得したい。

私はさまざまなソースからそれを試しました (例: https://github.com/survivingwithandroid/WeatherLibWeatherlib API Androidでエラーを取得し、 Weatherlib の Android でアクティビティを実行できません)、IM が応答できないさまざまなエラーを取得しました。適切なチュートリアルまたはガイドを入手できるものはありますか?

エラー:

-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に結果が表示されない ここに画像の説明を入力

LogCat メッセージ:

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.

ありがとう!

4

1 に答える 1

0

このプロジェクトは Eclipse 用ではありませんが、Android Studio を使用する必要があります。とにかく、https://github.com/survivingwithandroid/WeatherLib/tree/master/lib/releaseの下にあり、Eclipse にインポートできる jar を見つけることができます。Android Studio を使用することをお勧めします

于 2014-12-16T13:46:44.673 に答える