public class VideoMainActivity extends Activity { private VideoView vv; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main4); vv = (VideoView)this.findViewById(R.id.videoView1); String uri = "android.resource://com.example.online/" + R.raw.test; MediaController mc=new MediaController(VideoMainActivity.this); vv.setVideoURI(Uri.parse(uri)); vv.setMediaController(mc); try { vv.start(); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } }运行提示不能播放这个视频是怎么回事啊?
目前暂无任何回答
- 0 回答
- 0 关注
- 1350 浏览
添加回答
举报
0/150
提交
取消