发现 类似但似乎没有人对此作出回应
我一直在参考这个博客来进行我的开发。当它们在 R.raw 中时,我能够毫无问题地播放 mp4 视频。当我将它们移至扩展文件时,我遇到了播放问题。
谁能告诉我我在这里想念什么?
日志猫:
05-08 18:45:23.602: E/MediaPlayer(11452): prepareAsync called in state 1
05-08 18:45:23.602: W/dalvikvm(11452): threadid=1: thread exiting with uncaught exception (group=0×41172390)
05-08 18:45:23.622: E/AndroidRuntime(11452): FATAL EXCEPTION: main
05-08 18:45:23.622: E/AndroidRuntime(11452): java.lang.IllegalStateException
05-08 18:45:23.622: E/AndroidRuntime(11452): at android.media.MediaPlayer._prepareAsync(Native Method)
05-08 18:45:23.622: E/AndroidRuntime(11452): at android.media.MediaPlayer.prepareAsync(MediaPlayer.java:1283)
05-08 18:45:23.622: E/AndroidRuntime(11452): at android.widget.VideoView.openVideo(VideoView.java:239)
05-08 18:45:23.622: E/AndroidRuntime(11452): at android.widget.VideoView.setVideoURI(VideoView.java:197)
05-08 18:45:23.622: E/AndroidRuntime(11452): at android.widget.VideoView.setVideoURI(VideoView.java:187)
05-08 18:45:23.622: E/AndroidRuntime(11452): at rmm.android.app.VideoPlayerActivity.playVideo(VideoPlayerActivity.java:307)
05-08 18:45:23.622: E/AndroidRuntime(11452): at rmm.android.app.VideoPlayerActivity.onClick(VideoPlayerActivity.java:475)
05-08 18:45:23.622: E/AndroidRuntime(11452): at android.view.View.performClick(View.java:4102)
05-08 18:45:23.622: E/AndroidRuntime(11452): at android.view.View$PerformClick.run(View.java:17085)
05-08 18:45:23.622: E/AndroidRuntime(11452): at android.os.Handler.handleCallback(Handler.java:615)
提前致谢
快乐编码!