“dell_fan_cleaning.mp4”文件位于原始文件夹中,但未在VideoView中加载。这是代码..“
Uri video1 = Uri.parse("android.resource://" + getPackageName() + "/" + R.raw.dell_fan_cleaning);
videoView.setVideoURI(video1);
videoView.setMediaController(new MediaController(this));
videoView.requestFocus();
videoView.start();
答案 0 :(得分:0)
Uri uri = Uri.parse(URL); //Declare your url here.
VideoView mVideoView = (VideoView)findViewById(R.id.videoview)
mVideoView.setMediaController(new MediaController(this));
mVideoView.setVideoURI(uri);
mVideoView.requestFocus();
mVideoView.start();