I added the following code to my app to add a video view which is linked to a video in my raw folder but I'm getting an error on
VideoView saying that VideoView cannot be resolved or is not a field
I have included all the relevant imports.Is the an error somewhere in my syntax?
VideoView StudentLife = (VideoView) findViewById(R.id.VideoView);
Uri uri = Uri.parse("android.resource://"+getPackageName()+"/"+R.raw.learningatgmi);
videoview.setVideoURI(uri);
videoview.start();
My xml layout for videoview is as follows:
<VideoView
android:id="@+id/videoView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/textView2"
android:layout_centerHorizontal="true"
android:layout_marginTop="53dp" />