I am attempting to make a VideoView to obviously play videos on. When
I use the following code though I get the error "Cannot cast from View
to VideoView" on the marked line below.

public class VideoView extends Activity {

        private String video_link;
        private VideoView video_view;

        @Override
        public void onCreate(Bundle savedInstanceState) {
                super.onCreate(savedInstanceState);
                setContentView(R.layout.youtube_player);

                video_view = (VideoView) findViewById(R.id.video_view); ***ERROR
"Cannot cast from View to VideoView"

                Bundle video_bundle = getIntent().getExtras();
                video_link = video_bundle.getString("LINK");

        }

}

I have pretty much copied exactly what is shown in the API Demo
included in the SDK. Not sure what I've done wrong.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to