【发布时间】:2013-10-16 11:22:23
【问题描述】:
我正在尝试使用来自 https://developers.google.com/youtube/android/player/reference/com/google/android/youtube/player/YouTubeStandalonePlayer 的 YouTubeStandalonePlayer
在onCreate()里面有这段代码:
Intent intent = YouTubeStandalonePlayer.createVideoIntent(this, DeveloperKey.DEVELOPER_KEY, VIDEO_ID);
startActivity(intent);
但应用程序失败并出现错误。
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.youtubestandalone/com.example.youtubestandalone.MainActivity}: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.google.android.youtube.api.StandalonePlayerActivity.START (has extras) }
如何解决这个问题?
【问题讨论】:
-
你在 Manifest.xml 中定义了这个活动吗?
标签: android android-youtube-api