0

私のアプリはシミュレーターで正しく実行されますが、デバイスで実行しようとするとエラーが発生しません

この問題を解決してみてください

07-10 02:56:34.022: D/AndroidRuntime(28052): Shutting down VM
07-10 02:56:34.022: W/dalvikvm(28052): threadid=1: thread exiting with uncaught exception (group=0x40a551f8)
07-10 02:56:34.022: E/AndroidRuntime(28052): FATAL EXCEPTION: main
07-10 02:56:34.022: E/AndroidRuntime(28052): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.mobileTimerClock/com.android.mobileTimerClock.TimeClockDashBoard}: java.lang.NullPointerException: println needs a message
07-10 02:56:34.022: E/AndroidRuntime(28052):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
07-10 02:56:34.022: E/AndroidRuntime(28052):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
07-10 02:56:34.022: E/AndroidRuntime(28052):    at android.app.ActivityThread.access$600(ActivityThread.java:123)
07-10 02:56:34.022: E/AndroidRuntime(28052):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
07-10 02:56:34.022: E/AndroidRuntime(28052):    at android.os.Handler.dispatchMessage(Handler.java:99)
07-10 02:56:34.022: E/AndroidRuntime(28052):    at android.os.Looper.loop(Looper.java:137)
07-10 02:56:34.022: E/AndroidRuntime(28052):    at android.app.ActivityThread.main(ActivityThread.java:4424)
07-10 02:56:34.022: E/AndroidRuntime(28052):    at java.lang.reflect.Method.invokeNative(Native Method)
07-10 02:56:34.022: E/AndroidRuntime(28052):    at java.lang.reflect.Method.invoke(Method.java:511)
07-10 02:56:34.022: E/AndroidRuntime(28052):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
07-10 02:56:34.022: E/AndroidRuntime(28052):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
07-10 02:56:34.022: E/AndroidRuntime(28052):    at dalvik.system.NativeStart.main(Native Method)
07-10 02:56:34.022: E/AndroidRuntime(28052): Caused by: java.lang.NullPointerException: println needs a message
07-10 02:56:34.022: E/AndroidRuntime(28052):    at android.util.Log.println_native(Native Method)
07-10 02:56:34.022: E/AndroidRuntime(28052):    at android.util.Log.i(Log.java:159)
07-10 02:56:34.022: E/AndroidRuntime(28052):    at com.android.mobileTimerClock.TimeClockDashBoard.onCreate(TimeClockDashBoard.java:394)
07-10 02:56:34.022: E/AndroidRuntime(28052):    at android.app.Activity.performCreate(Activity.java:4465)
07-10 02:56:34.022: E/AndroidRuntime(28052):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
07-10 02:56:34.022: E/AndroidRuntime(28052):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
07-10 02:56:34.022: E/AndroidRuntime(28052):    ... 11 more
07-10 02:56:34.022: W/ActivityManager(177):   Force finishing activity com.android.mobileTimerClock/.TimeClockDashBoard
07-10 02:56:34.030: W/ActivityManager(177):   Force finishing activity com.android.mobileTimerClock/.DashBoard
07-10 02:56:34.530: W/ActivityManager(177): Activity pause timeout for ActivityRecord{41d0a690 com.android.mobileTimerClock/.TimeClockDashBoard}
4

1 に答える 1

2

Log.i(String, String)私の推測では、呼び出し (または同様のLog.*()メソッド)の 2 番目のパラメーターとして null を渡していると思います。

java.lang.NullPointerException: println needs a message
于 2012-07-10T16:34:08.863 に答える