我想在YouTube應用中使用Youtube API嵌入YouTube視頻。我導入了jar,將它添加到我的構建路徑中,並將YouTubePlayerView添加到了我的主視圖中。在OnCreate我有我的鑰匙下面的代碼,其中xxxx是:Android Youtube API錯誤YouTubePlayerView
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似乎工作正常。有任何想法嗎?