Skip to content Skip to sidebar Skip to footer

Crash Using YouTubePlayerSupportFragment

I have an activity that extends from a fragment public class Youtube_visor extends Fragment{ ... and a method that creates a new YouTube player using YouTubePlayerSupportFragment

Solution 1:

Looks like you've put a YouTubePlayerFragment in your XML, but you're trying to cast it to a YouTubePlayerSupportFragment in the code. Try replacing this line:

android:name="com.google.android.youtube.player.YouTubePlayerFragment"

With this:

android:name="com.google.android.youtube.player.YouTubePlayerSupportFragment"

Post a Comment for "Crash Using YouTubePlayerSupportFragment"