我的Android应用程序遇到了很多麻烦。它无法运行,但现在我可以运行了,不幸的是,我收到错误“应用程序 myapp(进程 com.example.package)已意外停止,请重试)这是我的日志文件
12-02 11:25:11.980: E/MediaPlayer(278): Unable to to create media player
12-02 11:25:12.290: D/MediaPlayer(278): create failed:
12-02 11:25:12.290: D/MediaPlayer(278): java.io.IOException: setDataSourceFD failed.: status=0x80000000
12-02 11:25:12.290: D/MediaPlayer(278): at android.media.MediaPlayer.setDataSource(Native Method)
12-02 11:25:12.290: D/MediaPlayer(278): at android.media.MediaPlayer.create(MediaPlayer.java:645)
12-02 11:25:12.290: D/MediaPlayer(278): at com.mohammed.watzIslam.Mymain.onCreate(Mymain.java:27)
12-02 11:25:12.290: D/MediaPlayer(278): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
12-02 11:25:12.290: D/MediaPlayer(278): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
12-02 11:25:12.290: D/MediaPlayer(278): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
12-02 11:25:12.290: D/MediaPlayer(278): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
12-02 11:25:12.290: D/MediaPlayer(278): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
12-02 11:25:12.290: D/MediaPlayer(278): at android.os.Handler.dispatchMessage(Handler.java:99)
12-02 11:25:12.290: D/MediaPlayer(278): at android.os.Looper.loop(Looper.java:123)
12-02 11:25:12.290: D/MediaPlayer(278): at android.app.ActivityThread.main(ActivityThread.java:4627)
12-02 11:25:12.290: D/MediaPlayer(278): at java.lang.reflect.Method.invokeNative(Native Method)
12-02 11:25:12.290: D/MediaPlayer(278): at java.lang.reflect.Method.invoke(Method.java:521)
12-02 11:25:12.290: D/MediaPlayer(278): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
12-02 11:25:12.290: D/MediaPlayer(278): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
12-02 11:25:12.290: D/MediaPlayer(278): at dalvik.system.NativeStart.main(Native Method)
12-02 11:25:12.290: D/AndroidRuntime(278): Shutting down VM
12-02 11:25:12.290: W/dalvikvm(278): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
12-02 11:25:12.300: E/AndroidRuntime(278): FATAL EXCEPTION: main
12-02 11:25:12.300: E/AndroidRuntime(278): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mohammed.watzIslam/com.mohammed.watzIslam.Mymain}: java.lang.NullPointerException
12-02 11:25:12.300: E/AndroidRuntime(278): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
12-02 11:25:12.300: E/AndroidRuntime(278): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
12-02 11:25:12.300: E/AndroidRuntime(278): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
12-02 11:25:12.300: E/AndroidRuntime(278): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
12-02 11:25:12.300: E/AndroidRuntime(278): at android.os.Handler.dispatchMessage(Handler.java:99)
12-02 11:25:12.300: E/AndroidRuntime(278): at android.os.Looper.loop(Looper.java:123)
12-02 11:25:12.300: E/AndroidRuntime(278): at android.app.ActivityThread.main(ActivityThread.java:4627)
12-02 11:25:12.300: E/AndroidRuntime(278): at java.lang.reflect.Method.invokeNative(Native Method)
12-02 11:25:12.300: E/AndroidRuntime(278): at java.lang.reflect.Method.invoke(Method.java:521)
12-02 11:25:12.300: E/AndroidRuntime(278): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
12-02 11:25:12.300: E/AndroidRuntime(278): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
12-02 11:25:12.300: E/AndroidRuntime(278): at dalvik.system.NativeStart.main(Native Method)
12-02 11:25:12.300: E/AndroidRuntime(278): Caused by: java.lang.NullPointerException
12-02 11:25:12.300: E/AndroidRuntime(278): at com.mohammed.watzIslam.Mymain.onCreate(Mymain.java:28)
12-02 11:25:12.300: E/AndroidRuntime(278): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
12-02 11:25:12.300: E/AndroidRuntime(278): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
12-02 11:25:12.300: E/AndroidRuntime(278): ... 11 more