When trying to create a YouTubeVideoPlayer within application, it gave below exception. And that is because the Activity hosting the YouTubePlayerView should be inherited from YouTubeBaseActivity not just a regular Activity or ActionBarActivity
Caused by: java.lang.IllegalStateException: A YouTubePlayerView can only be created with an Activity which extends YouTubeBaseActivity as its context.
at com.google.android.youtube.player.YouTubePlayerView.(Unknown Source)
at com.google.android.youtube.player.YouTubePlayerView.(Unknown Source)
at java.lang.r
References:
http://stackoverflow.com/questions/19664890/error-youtubeplayerview-xml
No comments:
Post a Comment