Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ssl/3.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 安卓Chromecast sender应用程序,播放按钮不';不显示在操作栏中_Android_Google Cast - Fatal编程技术网

Android 安卓Chromecast sender应用程序,播放按钮不';不显示在操作栏中

Android 安卓Chromecast sender应用程序,播放按钮不';不显示在操作栏中,android,google-cast,Android,Google Cast,我经历了这一切 至“装卸设备选择”段落,包括。 我希望cast按钮应该出现在动作栏中,但事实并非如此。我想Chromecast设备还没有被发现 我有真正的Chromecast设备,我在Google Cast SDK开发者控制台中注册了它。 我想这个设备被列入白名单是因为我可以访问http://chromecast\u device\u ip:9222 我在两天前设置了“检查更新时发送此Chromecast的序列号”选项。然后我重新启动了设备 另外,我在GoogleCastSDK开发人员控制台中注

我经历了这一切 至“装卸设备选择”段落,包括。 我希望cast按钮应该出现在动作栏中,但事实并非如此。我想Chromecast设备还没有被发现

我有真正的Chromecast设备,我在Google Cast SDK开发者控制台中注册了它。 我想这个设备被列入白名单是因为我可以访问http://chromecast\u device\u ip:9222

我在两天前设置了“检查更新时发送此Chromecast的序列号”选项。然后我重新启动了设备

另外,我在GoogleCastSDK开发人员控制台中注册了一个应用程序。但它还没有出版。 我想这不可能是原因,不是吗

我使用默认的应用程序ID作为应用程序ID。但我也尝试了注册应用程序的应用程序ID

我尝试了GitHub的示例应用程序: 投Tic-Tac-Toe, CastVideos android, MediaRouter播放按钮android。 在所有示例应用程序中都存在相同的问题。“强制转换”按钮不显示

在拨号客户端应用程序(作者输入)中,一切正常。但我不确定这是我需要实现的Chromecast sender应用程序

这是我的密码:

AndroidManifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.testcastbtn"
android:versionCode="1"
android:versionName="1.0" >

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />

<uses-sdk
    android:minSdkVersion="9"
    android:targetSdkVersion="21" />

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/Theme.AppCompat" >
    <meta-data
        android:name="com.google.android.gms.version"
        android:value="@integer/google_play_services_version" />
    <activity
        android:name=".MainActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>
menu.xml

<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:context="com.example.testcastbtn.MainActivity" >

<item
    android:id="@+id/test_menu_item"
    android:title="@string/test_menu_title"
    app:showAsAction="always"/>
<item
    android:id="@+id/media_route_menu_item"
    android:title="@string/media_route_menu_title"
    app:actionProviderClass="android.support.v7.app.MediaRouteActionProvider"
    app:showAsAction="always"/>


</menu>

另外,我在LogCat中发现了下一个错误。但它不会使应用程序崩溃

08-01 16:21:17.644: E/ExternalAccountType(547): Unsupported attribute readOnly
08-01 16:21:19.196: E/MediaProvider(21126): invalid album art, error creating album thumb file
08-01 16:21:22.249: E/dalvikvm(21520): Could not find class 'com.google.android.apps.youtube.app.remote.bi', referenced from method com.google.android.apps.youtube.app.remote.bh.<init>
08-01 16:21:22.269: E/dalvikvm(21520): Could not find class 'com.google.android.apps.youtube.core.player.notification.a', referenced from method com.google.android.apps.youtube.core.player.notification.ExternalPlaybackControllerV14.<init>
08-01 16:21:17.644:E/ExternalAccountType(547):不支持的属性只读
08-01 16:21:19.196:E/MediaProvider(21126):相册艺术无效,创建相册缩略图文件时出错
08-01 16:21:22.249:E/dalvikvm(21520):找不到从方法com.google.android.apps.youtube.app.remote.bi引用的类“com.google.android.apps.youtube.app.remote.bh”。
08-01 16:21:22.269:E/dalvikvm(21520):找不到类“com.google.android.apps.youtube.core.player.notification.a”,引用方法为com.google.android.apps.youtube.core.player.notification.ExternalPlaybackControllerV14。
更新

Leon Nicholls说,这是Cast SDK先前版本中已知的发现问题。Google Play服务的新版本5.0.89应该可以正常工作

我想我有一个旧版本的Cast SDK。 在google-play-services_lib/AndroidManifest.xml中,我看到了下一步

<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="5077000" android:versionName="5.0.77-000"

我只是等了一段时间(在我的情况下,我睡着了,8小时后它就工作了)。

你显示的几行日志似乎与你的应用程序无关。比如说,Google Play music或Play store中的任何第三方应用程序是否显示了播放按钮?是的,youtube应用程序中显示了播放按钮。我也可以从google chrome浏览器(使用chromecast扩展)进行cast。现在我认为旧的cast SDK可能有问题。我试图找出如何在Eclipse中更新Google Play服务。因为在Android SDK管理器中,它标记为已安装,并且没有任何更新…@AliNaddaf重新导入play services lib有帮助。在过去3天内出现了“演员”按钮。效果很好。几分钟前它突然消失了。我又有同样的问题了。。。我刚刚注意到谷歌游戏服务的更新出现在我的android SDK管理器中。rev 19可供我使用。现在我看到我的google play服务库是5.0.89版本。我并没有改变项目中的任何东西,它只是停止了工作。。。在所有示例应用程序中也是如此(例如VideoCast)。我再次尝试重新导入lib,但没有效果。
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="5077000" android:versionName="5.0.77-000"