final VideoView vv = (VideoView)findViewById(R.id.videoView1);
vv.setVideoURI(Uri.parse("android.resource://" + getPackageName() + "/" +R.raw.starttv));
vv.start();
//播放结束侦听
vv.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
public void onCompletion(MediaPlayer mp) {
vv.setVisibility(View.INVISIBLE);
}
});
在模拟器播放不了,在真机可以