简体   繁体   English

Videoview无法在API级别14以下播放视频

[英]Videoview does not play video in below API level 14

I'm developing application which plays video in videoview. 我正在开发在videoview中播放视频的应用程序。 Everything seems fine. 一切似乎都很好。 But when i am trying to play video in Android 3.2(API 13), it shows blank screen and popups the message - "Can't play this video" and it works perfectly in any other device which have more than API level 13. Here is my code snippet if anyone could help me. 但是,当我尝试在Android 3.2(API 13)中播放视频时,它显示空白屏幕并弹出消息-“无法播放此视频”,并且它在具有API级别13以上的任何其他设备中都可以完美运行。如果有人可以帮助我,这是我的代码段。

VideoView videoView;
videoView = (VideoView) findViewById(R.id.videoView);
videoView.setVideoURI(uri);
videoView.requestFocus();
videoView.start();

And in Logcat it shows error information that MediaPlayer path is null which is not null actually. 并且在Logcat中,它显示错误信息,即MediaPlayer path is null ,而实际上并非为null。 Any help would be appreciated. 任何帮助,将不胜感激。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM