VideoView Crashes app. What's wrong?
<p>Hi Guys This happens when I try to run my app, I am trying to stream a video using an url and this happens, app says "Application Failure detected" and crashes instantly. What's wrong?</p>

<pre><code>05-07 20:48:41.740: E/AndroidRuntime(2678): in writeCrashedAppName, pkgName :com.example.the
05-07 20:48:41.760: E/AndroidRuntime(2678): FATAL EXCEPTION: main
05-07 20:48:41.760: E/AndroidRuntime(2678): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.the/com.example.the.MainActivity}: java.lang.ClassCastException: android.widget.VideoView
05-07 20:48:41.760: E/AndroidRuntime(2678):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
05-07 20:48:41.760: E/AndroidRuntime(2678):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
05-07 20:48:41.760: E/AndroidRuntime(2678):     at android.app.ActivityThread.access$1500(ActivityThread.java:117)
05-07 20:48:41.760: E/AndroidRuntime(2678):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
05-07 20:48:41.760: E/AndroidRuntime(2678):     at android.os.Handler.dispatchMessage(Handler.java:99)
05-07 20:48:41.760: E/AndroidRuntime(2678):     at android.os.Looper.loop(Looper.java:130)
05-07 20:48:41.760: E/AndroidRuntime(2678):     at android.app.ActivityThread.main(ActivityThread.java:3683)
05-07 20:48:41.760: E/AndroidRuntime(2678):     at java.lang.reflect.Method.invokeNative(Native Method)
05-07 20:48:41.760: E/AndroidRuntime(2678):     at java.lang.reflect.Method.invoke(Method.java:507)
05-07 20:48:41.760: E/AndroidRuntime(2678):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:880)
05-07 20:48:41.760: E/AndroidRuntime(2678):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:638)
05-07 20:48:41.760: E/AndroidRuntime(2678):     at dalvik.system.NativeStart.main(Native Method)
05-07 20:48:41.760: E/AndroidRuntime(2678): Caused by: java.lang.ClassCastException: android.widget.VideoView
05-07 20:48:41.760: E/AndroidRuntime(2678):     at com.example.the.MainActivity.onCreate(MainActivity.java:22)
05-07 20:48:41.760: E/AndroidRuntime(2678):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
05-07 20:48:41.760: E/AndroidRuntime(2678):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
05-07 20:48:41.760: E/AndroidRuntime(2678):     ... 11 more
</code></pre>
