Google play Key in manifest 出现了很多错误和红色感叹号

Google play Key in manifest made a lot of errors and red exclamation mark

所以我遵循了这个指南https://developers.google.com/maps/documentation/android-api/signup

并在此处创建了一个新的 Google Developer Console 项目 https://console.developers.google.com/home

我输入了我的 Eclipse 项目包名称并得到了 Google Key.

现在正如向导所说,我将其添加到我的清单中

 <meta-data
    android:name="com.google.android.geo.API_KEY"
    android:value="YOUR_API_KEY"/>

在我这样做之后,我的项目中出现了很多错误,而且我的所有项目附近也有一个红色感叹号 workspace

那么我做错了什么?我只想使用 google play 开始开发。拜托,我阅读了他们和 eclipse 中的所有指南,但我仍然无法完成它。

编辑 我想我可能错过了 google play services library。我找不到下载地址。

清单: 根据要求。

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.minyan.get.dl"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="11"
        android:targetSdkVersion="23" />

     <uses-permission 
        android:name="android.permission.ACCESS_FINE_LOCATION"/>
    <uses-permission 
        android:name="android.permission.INTERNET"/>
    <uses-permission 
        android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <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>
        <activity
            android:name=".MyLocation"
            android:label="@string/title_activity_my_location" >
        </activity>

        <meta-data
            android:name="com.google.android.geo.API_KEY"
            android:value="AIzaSyCzVDpAckc5p3DGRIJsco-CyIiFfjgn--k />

    </application>

</manifest>

与指南中一样,<meta data /> 在应用程序标签中。

基本上google播放服务库不需要下载,它只驻留在您的SDK中

这是路径,你可以找到图书馆

.../sdk/extras/google/google_play_services/libproject/google-play-services_lib

要使 Google Play 服务 API 可用于您的应用:

<android-sdk>/extras/google/google_play_services/libproject/google-play-services_lib/ 的库项目复制到您维护 Android 应用程序项目的位置。

将库项目导入 Eclipse 工作区。 Click File > Import, select Android > Existing Android Code into Workspace, 并浏览到库项目的副本以将其导入。

将 Google Play 服务库添加为应用项目的依赖项后,打开应用的清单文件并将以下标记添加为 <application> 元素的子元素:

<meta-data android:name="com.google.android.gms.version"
    android:value="@integer/google_play_services_version" />

我认为以下方法可以解决您的问题:

 <meta-data
        android:name="com.google.android.geo.API_KEY"
        android:value="AIzaSyCzVDpAckc5p3DGRIJsco-CyIiFfjgn--k" />
                                                              ^
                                                              !