Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/195.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
android中的Youtube集成在棒棒糖中不起作用_Android_Youtube Api_Android 5.0 Lollipop_Android Youtube Api - Fatal编程技术网

android中的Youtube集成在棒棒糖中不起作用

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

我嵌入了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://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>