Skip to content Skip to sidebar Skip to footer

Youtube Player Inside Tabbed Activity Cause This Error

I have tabbed activity and I want to have youtube video on third tab. here's my java : public class FragmentTutorial extends YouTubePlayerFragment { YouTubePlayerView youTube

Solution 1:

Probably it is caused by the wrong Fragment class, YouTubePlayerFragment extends android.app.Fragment, FragmentPagerAdapter requires android.support.v4.app.Fragment and this cannot be converted

Edit:

try to use android.support.v13.app.FragmentPagerAdapter instead android.support.v4.app.FragmentPagerAdapter (other fragments should extends android.app.Fragment)


Post a Comment for "Youtube Player Inside Tabbed Activity Cause This Error"