【发布时间】:2016-07-23 11:49:55
【问题描述】:
我已经在我的安卓应用中实现了 YouTubePlayerSupportFragment。 对于 targetSdkVersion=19,它运行良好。
但是当我设置 targetSdkVersion 23 时它崩溃了。
例外是:
java.lang.IllegalArgumentException: Service Intent must be explicit: Intent { act=com.google.android.youtube.api.service.START }
at android.app.ContextImpl.validateServiceIntent(ContextImpl.java:1209)
at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1308)
at android.app.ContextImpl.bindService(ContextImpl.java:1286)
【问题讨论】:
-
不是回答你的问题吗 -
Service Intent must be explicit:?显示您致电startActivity或startService的地点 -
使用更新api YouTubeAndroidPlayerApi-1.2.2 developers.google.com/youtube/android/player/downloads
-
@Divers :我在 StartActivity 中添加了 YoutubeSupportFragment,它是通过清单条目初始化的..
-
@Exception Lover:是的..我使用的是 1.2.2,但面临同样的问题...代码适用于 targetSdkVersion 19。