android中的Youtube集成在棒棒糖中不起作用
我嵌入了youtube API,可以在android应用程序中播放视频。它在kitkat,Jellybean中完全有效。但在棒棒糖设备中,只要点击“播放”按钮,应用程序就会崩溃。代码如下。我使用了YOUTUBEPLAYER API的1.2.2版本 链接到myLogcat Xml布局:android中的Youtube集成在棒棒糖中不起作用,android,youtube-api,android-5.0-lollipop,android-youtube-api,Android,Youtube Api,Android 5.0 Lollipop,Android Youtube Api,我嵌入了youtube API,可以在android应用程序中播放视频。它在kitkat,Jellybean中完全有效。但在棒棒糖设备中,只要点击“播放”按钮,应用程序就会崩溃。代码如下。我使用了YOUTUBEPLAYER API的1.2.2版本 链接到myLogcat Xml布局: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://sch
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#000000"
>
<com.google.android.youtube.player.YouTubePlayerView
android:id="@+id/youtube_view"
android:keepScreenOn="true"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#000000"
/>
</RelativeLayout>
你能发布你的日志吗?我已经添加了日志。你能帮忙吗?你能发布你的youtube\u活动的布局吗?链接到myLogcat,我在代码中加入了xml部分。在非棒棒糖设备中,一切都能正常工作。
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#000000"
>
<com.google.android.youtube.player.YouTubePlayerView
android:id="@+id/youtube_view"
android:keepScreenOn="true"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#000000"
/>
</RelativeLayout>