我想使用googleAPI。我尝试过以下方法: 1)我使用keytool和debug.keystore生成了一个googleAPI密钥。 2)我还使用Myactivity.keystore生成了另一个密钥。
按照这些说明,从fere和其他位置: 为了让它发挥作用,你必须做以下事情:
您必须生成应用程序调试密钥的MD5哈希值 注册地图密钥时,您必须向Google提供该MD5哈希值 然后,Google会为您提供一个可以放入mapview的密钥 这将在以下步骤中起作用:
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密钥是否正确?
答案 0 :(得分:1)
尝试使用此方法获取正确的API密钥: -
这是确切的路径 -
keytool -list -keystore "C:\Users\XYZ\.android\debug.keystore"
cmd提示获取GoogleMap API密钥的MD5指纹*的总路径* **
D:\eclipse\jre\bin>keytool -list -keystore "C:\Users\XYZ\.android\debug.keystore"
MD5 fingurePrint看起来像这样 -
3E:F4:D6:E6:93:4D:BB:B8:62:3A:A6:0F:E0:FC:4C:65
当您获得API密钥后获取fingurePrint数字时,请使用此链接---
http://code.google.com/android/add-ons/google-apis/maps-api-signup.html
然后你将获得系统的API密钥,并且可以轻松获得Map ....
答案 1 :(得分:-1)
见Link。我已按照此链接上的步骤显示地图。请仔细阅读。