Wow, thanks so much Mark. I hate when it's something so simple as that. I guess sometimes you just need an outside person to take a look to notice the simple problems.
Cheers, Matt On Apr 17, 7:02 am, Mark Murphy <[email protected]> wrote: > Matthew Patience wrote: > > 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 have named your Activity subclass "VideoView". That name will take > preference over android.widget.VideoView. I would recommend you change > the name of the activity to something that won't collide with an SDK class. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://twitter.com/commonsguy > > Android Training...At Your Office:http://commonsware.com/training > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group > athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

