YouTube API を使用して Android アプリに YouTube ビデオを埋め込もうとしています。jar をインポートしてビルド パスに追加し、YouTubePlayerView をメイン ビューに追加しました。onCreate には、 xxxx がキーである次のコードがあります。
YoutubePlayerView ytpv = (YouTubePlayerView) findViewById(R.id.youtubeplayer);
ytpv.initialize("xxxx", this);
アプリを実行すると、例外が発生します。
java.lang.SecurityException: Not allowed to bind to service Intent { act=com.google.android.youtube.api.service.START }
APIに付属の同じアプリを実行しようとすると、うまくいくようです。何か案は?