我收到了这个错误:
06-28 09:32:24.266: E/MediaPlayer(16454): Unable to to create media player
06-28 09:32:24.338: W/VideoView(16454): Unable to open content: /data/data/com.laroche/cache/intro.mp4
06-28 09:32:24.338: W/VideoView(16454): java.io.IOException: setDataSourceFD failed.: status=0x80000000
06-28 09:32:24.338: W/VideoView(16454): at android.media.MediaPlayer.setDataSource(Native Method)
06-28 09:32:24.338: W/VideoView(16454): at android.media.MediaPlayer.setDataSource(MediaPlayer.java:976)
06-28 09:32:24.338: W/VideoView(16454): at android.media.MediaPlayer.setDataSource(MediaPlayer.java:955)
06-28 09:32:24.338: W/VideoView(16454): at android.media.MediaPlayer.setDataSource(MediaPlayer.java:918)
06-28 09:32:24.338: W/VideoView(16454): at android.media.MediaPlayer.setDataSource(MediaPlayer.java:870)
06-28 09:32:24.338: W/VideoView(16454): at android.widget.VideoView.openVideo(VideoView.java:236)
06-28 09:32:24.338: W/VideoView(16454): at android.widget.VideoView.access$2000(VideoView.java:52)
06-28 09:32:24.338: W/VideoView(16454): at android.widget.VideoView$6.surfaceCreated(VideoView.java:490)
使用以下代码时:
String cacheDir = getApplicationContext().getCacheDir().getAbsolutePath();
Log.d("video path",cacheDir+"/intro.mp4");
vvIntro.setVideoPath(cacheDir+"/intro.mp4");
vvIntro.start();
我想播放存储在缓存文件夹中的视频