Search code examples
androidandroid-studiovitamio

Error wtih vitamio in android studio. Incompatible types


I'm using android studio and i have a problem with Vitamio VideoView.

Here is my layout file:

enter image description here

Here is an error in my class:

enter image description here


Solution

  • This is normal behaviour. findViewById returns a View which is a superclass of VideoView.

    Just add a type cast:

    mVideoView = (VideoView)findViewById(R.id.surface_view);