【发布时间】:2014-05-31 01:46:15
【问题描述】:
我正在尝试将我的应用配置为对 Chromecast 特色按钮进行编程。
我正在阅读所有 chromecast SDK,它说我必须安装 Google Play 服务。 我在同一个工作区将库链接到我的项目。我做得很好,因为我有一个名为 google_play_services.jar 的新 Android 依赖库
当我到达这一点时,我想测试googlePlayServices是否可用,所以我想使用:
GooglePlayServicesUtil.isGooglePlayServicesAvailable(getApplicationContext());
并打印带有结果的日志。
但是问题出现在这里。当我运行我的应用时,它说它不在我的 Android 清单中。
我的 Android Manifest 已经包含以下几行:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.chromecastAPP"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="18" />
<uses-permission android:name="android.permission.INTERNET"/>
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.chromecastAPP.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>
</manifest>
任何不同的解决方案?
谢谢
【问题讨论】:
-
请发布您的整个清单文件
-
帖子已编辑,包括我的所有清单
-
元数据必须在应用程序标签中
-
看看我的回答是否对你有帮助,我把它贴在下面
-
为什么我有反对票? :S:S
标签: android android-manifest google-play-services chromecast