1

我正在尝试编写一个应用程序。我需要做活动来观看在线流。现在尝试使用 youtube。我得到了错误:/

这是我的代码:

protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);
    Log.d(TAG, "Starting Video View");

    setContentView(R.layout.video_views);

    this.Url = getIntent().getStringExtra("Url");
    Log.d(TAG, "Stream Address: " + Url);

    video_view = (VideoView) findViewById(R.id.video_views);
    Uri uri = Uri.parse(Url);

    video_view.setVideoURI(uri);
    video_view.requestFocus();
    video_view.start();

}

这是错误:

04-17 09:16:07.151: D/MediaPlayer(26908): Couldn't open file on client side, trying server side
04-17 09:16:30.250: E/MediaPlayer(26908): error (1, -2147483648)
04-17 09:16:30.250: E/MediaPlayer(26908): Error (1,-2147483648)
04-17 09:16:30.250: D/VideoView(26908): Error: 1,-2147483648

网址是 100% 正确的,我无法在浏览器中打开它。有任何想法吗?我试图只在模拟器上打开,这可能是问题的根源吗?

4

0 回答 0