../../
答案 0 :(得分:-1)
试试这段代码
VideoView videoView;
setContentView(R.layout.video_activity);
videoView =(VideoView) findViewById(R.id.vidProfile);
MediaController mediaController= new MediaController(this);
mediaController.setAnchorView(videoView);
String uriPath = "android.resource://com.videoexample/"+R.raw.try_it;
Uri uri= Uri.parse(uriPath);
videoView.setMediaController(mediaController);
videoView.setVideoURI(uri);
videoView.requestFocus();
videoView.start();
希望它会有所帮助