我试图从我的应用程序目录播放视频文件,但我得到的只是:
03-14 15:43:14.539: W/VideoView(6680): Unable to open content: /data/data/com.example.video/files/temp.mp4
03-14 15:43:14.539: W/VideoView(6680): java.io.IOException: Prepare Async failed.: status=0x80000000
03-14 15:43:14.539: W/VideoView(6680): at android.media.MediaPlayer.prepareAsync(Native Method)
03-14 15:43:14.539: W/VideoView(6680): at android.widget.VideoView.openVideo(VideoView.java:287)
03-14 15:43:14.539: W/VideoView(6680): at android.widget.VideoView.access$2400(VideoView.java:51)
03-14 15:43:14.539: W/VideoView(6680): at android.widget.VideoView$8.surfaceCreated(VideoView.java:604)
03-14 15:43:14.539: W/VideoView(6680): at android.view.SurfaceView.updateWindow(SurfaceView.java:569)
03-14 15:43:14.539: W/VideoView(6680): at android.view.SurfaceView.access$000(SurfaceView.java:85)
03-14 15:43:14.539: W/VideoView(6680): at android.view.SurfaceView$3.onPreDraw(SurfaceView.java:174)
03-14 15:43:14.539: W/VideoView(6680): at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:590)
03-14 15:43:14.539: W/VideoView(6680): at android.view.ViewRoot.performTraversals(ViewRoot.java:1451)
03-14 15:43:14.539: W/VideoView(6680): at android.view.ViewRoot.handleMessage(ViewRoot.java:2085)
03-14 15:43:14.539: W/VideoView(6680): at android.os.Handler.dispatchMessage(Handler.java:99)
03-14 15:43:14.539: W/VideoView(6680): at android.os.Looper.loop(Looper.java:132)
03-14 15:43:14.539: W/VideoView(6680): at android.app.ActivityThread.main(ActivityThread.java:4196)
03-14 15:43:14.539: W/VideoView(6680): at java.lang.reflect.Method.invokeNative(Native Method)
03-14 15:43:14.539: W/VideoView(6680): at java.lang.reflect.Method.invoke(Method.java:491)
03-14 15:43:14.539: W/VideoView(6680): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
03-14 15:43:14.539: W/VideoView(6680): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
03-14 15:43:14.539: W/VideoView(6680): at dalvik.system.NativeStart.main(Native Method)
从外部存储文件播放没有任何问题。可用内存长度为 150MB。视频文件长度为 2MB。可能是我忘了包含一些权限吗?请帮忙。谢谢!