我正在使用以下代码:
try {
File f = new File(getVideoUrl(listVideoUrls.get(0)));
Log.d("MediaPlayer","Fexists?"+f.exists());
MediaPlayer pl = new MediaPlayer();
FileInputStream fi = new FileInputStream(f);
pl.setDataSource(fi.getFD());
pl.prepare();
pl.start();
Log.d("MediaPlayer","MediaPlayer startet.");
} catch (Exception e) { alert(e.getMessage()); }
但是消息失败了
android mediaplayer准备失败状态0x64
我不明白为什么。该文件存在(file.exists()
为真)并位于/Android/obb/de.blub.kaese/video.mp4
.