Forum Xamarin Xamarin.Android

Error with Android App Play Video

I'm making an Android app in which I want to play a video hosted on a URL and run it I get the error attached in the image.

Attached also the code used to it:

using System;
using Android.App;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
using Android.Media;
namespace Rep_Video_1
[Activity (Label = "Rep_Video_1", MainLauncher = true, Icon = "@mipmap/icon")]
public class Activity1 : Activity

protected override void OnCreate (Bundle bundle)
    base.OnCreate (bundle);

    // Set our view from the "main" layout resource
    SetContentView (Resource.Layout.Main);

    // Get our button from the layout resource,
    // and attach an event to it

    var videoView = FindViewById<VideoView> (Resource.Id.SampleVideoView);
    var uri = Android.Net.Uri.Parse ("");
    videoView.SetVideoURI (uri);
    videoView.Start (); 




Thank you very much! It is a little urgent!

Sign In or Register to comment.