【发布时间】:2012-04-19 10:52:13
【问题描述】:
我想使用 googleAPI。我尝试了以下方法: 1)我使用 keytool 和 debug.keystore 生成了一个 googleAPI 密钥。 2) 我还使用 Myactivity.keystore 生成了另一个密钥。
按照这些说明,从 fere 和其他位置: 您必须执行以下操作才能使其正常工作:
您必须生成应用程序调试密钥的 MD5 哈希 在注册地图密钥时,您必须向 Google 提供该 MD5 哈希 然后谷歌会给你一个你可以放在你的地图视图中的密钥 这将在以下步骤中起作用:
Locate the android debug key in your system. it is found on the following locations depending on your operating system (This path will be useful):
Windows XP: C:\Documents and Settings\<user>\.android\debug.keystore
Mac OS X and Linux : ~/.android/debug.keystore (where ~ is the path of your home directory.
In a terminal, use the following keytool command to generate the MD5 Hash:
keytool -list -alias androiddebugkey -keystore <path_to_debug_keystore>.keystore -storepass android -keypass android
Copy the generated hash
Go to : code.google. com/android/maps-api-signup.html (you maybe required to login with your Google account)
Paste the above generated MD5 hash there, accept the Terms and Conditions and click on Generate button
You'll get the API key for your map. paste this in your
When you plan to release the app, generate a release key and repeat the same procedure with the release keys.
Although, all the above steps are exactly what the links contain, but this is a summary.
我都试过了,但似乎都没有。我在 logcat 中只看到网格蚂蚁我得到Couldn't get connection factory client 并且通过我所做的所有搜索,这是我的 api 密钥的问题。我怎么知道我的 api 密钥是正确的?
【问题讨论】:
-
这里,你必须使用释放键而不是api键来显示地图。
-
释放密钥是指使用 keytool 和 myactivity.keystore 的一种生成形式不调试?如果是,我已经做到了,但它不起作用。
标签: android google-maps