所以我按照本指南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 />
在应用程序标签中。