Error inflating class com.google.android.youtube.player.YouTubePlayerView In List Adapter
From the documentation:
Using this View directly is an alternative to using the
YouTubePlayerFragment
. If you choose to use this view directly, your activity needs to extendYouTubeBaseActivity
.
Therefore, you must make sure your activity extends YouTubeBaseActivity
. Alternatively, if your activity does not need to extend an activity provided by the library, you can use the YouTubePlayerSupportFragment
and FrameActivity from android.support.v4.
<fragment
android:name="com.google.android.youtube.player.YouTubePlayerSupportFragment"
android:id="@+id/youtubesupportfragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>