VideoView videoView = new VideoView(this);
String UrlPath="android.resource://"+getPackageName()+"/"+R.raw.ff;
videoView.setMediaController(new MediaController(this));
Uri video = Uri.parse(UrlPath);
videoView.setVideoURI(video);
setContentView(videoView);
videoView.start();
视频正在Lollipop上运行的Android模拟器中播放,但不会在Lollipop上运行的设备上播放。错误是视频无法播放。