一、获取Google API Key,简要说明一下:
(1)找到debug.keystore文件:通常情况下是在C:\Documents and Settings\当前用户\Local Settings\Application Data\Android\debug.keystore(windows 7 中的格式一般是:C:\Users\当前用户名\.android\debug.keystore )。但是最好的办法是打开eclipse,选择windows->Preference->Android->Build,其中default debug keystore值便是要的路径了。
(2)取得dubug.keystore的MD5值:CMD下进入上面的路径,执行命令:keytool -list -keystore debug.store,这时会提示输入密码,输入密码“android”即可获得MD5值。
(3)也可以在cmd中执行: (可以先定位到jdk的bin目录下)
keytool -list -alias androiddebugkey - keystore " C: Documents and SettingsMYNAME.androiddebug.keystore " -storepass android -keypass android
双引号中的为你keystore位置, (一定要有双引号),否则就会报错。
如果系统提示找不到keytool,需要将jdk中bin目录加入到环境变量中。
要使用Android Maps API,首先需要申请一个API Key。
网址:
打开http://code.google.com/intl/zh-CN/android/maps-api-signup.html
填入你的认证指纹(MD5)即可获得apiKey了,结果显示如下:
感谢您注册 Android 地图 API 密钥!
您的密钥是:
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
我IE打开的时候是乱码,不知道是不是自己电脑有问题。后来改用了chrome就正常显示了。
二、有很多朋友在申请Maps API的时候可能都会遇到这种情况:
“您输入的指纹无效。请按浏览器上的“返回”按钮,并输入有效的证明指纹。 ”
证书的指纹的是(SHA1)的,不是我们要的(MD5)的。
三、解决办法:
在keytool -list -alias androiddebugkey - keystore " C: Documents and SettingsMYNAME.androiddebug.keystore " -storepass android -keypass android命令后面加上-v,之后就有生成的(MD5)的证书指纹了。
大家仔细观察这两次的证书指纹命令的差别!以及MD5跟SHA1的证书指纹长短的差别。
MD5 的证书指纹长度是16位的,而SHA1的证书指纹长度是20位的,这就是我们在注册的时候提示错误的原因!
欢迎大家指教!
分享到:
相关推荐
对于android初学者开发Maps地图,如何获取Google Maps APIKey是一个难题, 这只自己结合多方资料后整理出来的,希望对你有用,谢谢。
Android-Google-Maps-Directions-API 演示如何使用Android上的Google Maps Directions API在地图上生成折线。 关于如何使用Java在Android上使用Google Maps Directions API的文档很少。 此存储库将帮助您在应用中...
Android-Sample-ContentProviider-Maps-Flip-Animation ###Sample 应用程序...meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="Enter Your Key Here" /> 有关更多详细信息,请参阅
一、申请google Maps API key(用于开发和debug) 二.Google Map API的使用 三.实例开发
In addition to covering general Android development techniques, the book also includes Google Play specific topics such as implementing maps using the Google Maps Android API, in-app billing and ...
GeoFencing-Sample-app 在 Android 中演示地理围栏的示例应用程序,使用 IntelliJ IDE 开发。 需要添加 GooglePlay Service、android 支持库和 Google Maps API Key
RxPlaces A reactive approach for the ...You should use the function create(GOOGLE_MAPS_API_AUTOCOMPLETE_KEY), where GOOGLE_MAPS_API_AUTOCOMPLETE_KEY is the generated key from the Google developer c
Get a google maps API key and place it in a file that looks like the following: Your Key Here This file should be named google_maps_api.xml and should go in res/values You will also need to add ...
android:apiKey="YOUR API key" /> <Button android:text="@+id/Button01" android:id="@+id/Button01" android:layout_width="wrap_content" android:layout_height="wrap_content"> //--------------------- ...
该存储库包含一个使用 Google Maps v2 为 Android 开发的简单示例。 系统遵循地图上标记的点。 并提供近似的递减修正。 配置 如果您决定使用 FollowPath,您需要: 安装 GooglePlayServices 作为库 在 ...
CrimeMapper This is a simple android application for downloading and displaying crime report data from ...To enable Google Maps in the application please add your maps api key to the api-keys.xml file
在android上显示google地图,如何在android中使用google maps apikey
public final class LocalConfig { private LocalConfig() { } public static final String GOOGLE_MAPS_API_KEY_RELEASE = "<YOUR_RELEASE_KEY>"; public static final String GOOGLE_MAPS_API_KEY_DEBUG = ...
申请APIkey的时候,类似命令如下: C:\Documents and Settings\Administrator\Local Settings\Application Data\Android> "C:\Program Files\Java\jdk1.6.0_10\bin\keytool.exe" -list -alias androiddebugkey -...
Android-GoogleDirectionLibrary 适用于Android的Google Maps Direction API助手下载由于版本2.1.2 // build.gradle (project)allprojects { repositories { mavenCentral() /* ... */ }} Gradleimplementation '...
您最喜欢的终端React本机CLI 模拟器android(您可以使用实际设备,只需在开发模式下启用android调试) 喝点咖啡来保持眼神并为此保持精神但是在我制作的这个应用程序中,我使用的是来自Google Maps和Zomato的api,...
GeoAR演示该项目使用Google Maps Places API,并将其放置在3D空间中的用户周围。屏幕截图正在安装git clone ... 获取密钥后,在App.js第25行的MAPS_API_KEY常量上进行设置。需要帮忙? 还是想贡献?
.Google Maps API 申请方式变更在Google Maps API 的部份,官方网站目前是建议使用新版本(v3)的API 进行开发,若您仍希望继续使用v2 的版本进行开发,您可能需要进行部份设定的修改,底下是设定的流程: ...
config.js应采用以下格式: export const baseURL = "https://api.partner.gce1.bestmile.io", userID = "USER_ID", iOS_userID = "iOS_USER_ID", android_userID = "ANDROID_USER_ID", siteID = "SITE_ID", apiKey ...