我的遊戲從啓動畫面開始播放音樂,直到有人觸摸屏幕或給定的時間過期。然後進入有兩個按鈕的菜單活動,一個開始遊戲,另一個開啓一個活動,彈出一個透明窗口,告訴用戶關於遊戲的信息。遊戲隊在不同時間關閉。需要幫助解釋logCat警告和錯誤
我目前的問題是,有時當我開始遊戲時,我馬上就會收到一個力量,或者當我觸摸屏幕跳過飛濺,當我按下開始玩遊戲時,甚至在這個錯誤特定情況下我按下了關於按鈕。對我而言,奇怪的是有時候一切正常。
即使它有效,我也會收到很多這些錯誤,我只需要一些幫助來解釋它們,以便我可以修復它們。我不確定在哪一點上我開始關閉這些部隊,因爲它之前一直在工作。我一直有錯,但我不想要不穩定的東西。
如果您需要其他信息來幫助,請告訴我您的位置。 :D
謝謝,我迫不及待地讓這個應用程序回到正軌,所以我可以在功能上工作!
以下錯誤是運行我的遊戲,並在主菜單中按下並得到一個關閉的結果。
09-11 20:54:53.984: WARN/AudioFlinger(34): write blocked for 82 msecs, 23 delayed writes, thread 0xb3f0
09-11 20:54:55.314: WARN/TimedEventQueue(34): Event 15 was not found in the queue, already cancelled?
09-11 20:54:55.314: ERROR/MediaPlayer(302): stop called in state 1
09-11 20:54:55.314: ERROR/MediaPlayer(302): error (-38, 0)
09-11 20:54:55.354: ERROR/global(302): Deprecated Thread methods are not supported.
09-11 20:54:55.354: ERROR/global(302): java.lang.UnsupportedOperationException
09-11 20:54:55.354: ERROR/global(302): at java.lang.VMThread.stop(VMThread.java:85)
09-11 20:54:55.354: ERROR/global(302): at java.lang.Thread.stop(Thread.java:1379)
09-11 20:54:55.354: ERROR/global(302): at java.lang.Thread.stop(Thread.java:1344)
09-11 20:54:55.354: ERROR/global(302): at com.ss.game.Splash$1.run(Splash.java:61)
09-11 20:55:22.915: WARN/TimedEventQueue(34): Event 2 was not found in the queue, already cancelled?
09-11 20:55:22.925: WARN/dalvikvm(302): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
09-11 20:55:22.945: ERROR/AndroidRuntime(302): FATAL EXCEPTION: main
09-11 20:55:22.945: ERROR/AndroidRuntime(302): java.lang.RuntimeException: Unable to pause activity {com.ss.game/com.ss.game.MyMenu}: java.lang.NullPointerException
09-11 20:55:22.945: ERROR/AndroidRuntime(302): at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3348)
09-11 20:55:22.945: ERROR/AndroidRuntime(302): at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3305)
09-11 20:55:22.945: ERROR/AndroidRuntime(302): at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:3288)
09-11 20:55:22.945: ERROR/AndroidRuntime(302): at android.app.ActivityThread.access$2500(ActivityThread.java:125)
09-11 20:55:22.945: ERROR/AndroidRuntime(302): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2040)
09-11 20:55:22.945: ERROR/AndroidRuntime(302): at android.os.Handler.dispatchMessage(Handler.java:99)
09-11 20:55:22.945: ERROR/AndroidRuntime(302): at android.os.Looper.loop(Looper.java:123)
09-11 20:55:22.945: ERROR/AndroidRuntime(302): at android.app.ActivityThread.main(ActivityThread.java:4627)
09-11 20:55:22.945: ERROR/AndroidRuntime(302): at java.lang.reflect.Method.invokeNative(Native Method)
09-11 20:55:22.945: ERROR/AndroidRuntime(302): at java.lang.reflect.Method.invoke(Method.java:521)
09-11 20:55:22.945: ERROR/AndroidRuntime(302): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
09-11 20:55:22.945: ERROR/AndroidRuntime(302): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
09-11 20:55:22.945: ERROR/AndroidRuntime(302): at dalvik.system.NativeStart.main(Native Method)
09-11 20:55:22.945: ERROR/AndroidRuntime(302): Caused by: java.lang.NullPointerException
09-11 20:55:22.945: ERROR/AndroidRuntime(302): at com.ss.lastzombie.MyMenu.onPause(MyMenu.java:78)
09-11 20:55:22.945: ERROR/AndroidRuntime(302): at android.app.Activity.performPause(Activity.java:3842)
09-11 20:55:22.945: ERROR/AndroidRuntime(302): at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1190)
09-11 20:55:22.945: ERROR/AndroidRuntime(302): at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3335)
09-11 20:55:22.945: ERROR/AndroidRuntime(302): ... 12 more
09-11 20:55:23.477: WARN/ActivityManager(59): Activity pause timeout for HistoryRecord{43fea4f8 com.ss.game/.MyMenu}
09-11 20:55:32.984: WARN/ActivityManager(59): Launch timeout has expired, giving up wake lock!
09-11 20:55:33.454: WARN/InputManagerService(59): Got RemoteException sending setActive(false) notification to pid 302 uid 10032
MyMenu.java:78存在空指針異常。而已。 – Cristian
@克里斯蒂安爲什麼不每次都強迫關門? – KRB