我创建了一个带有maps.i的应用程序已经按照我从网上找到的每一步,我已经获得了密钥,应用程序在模拟器上运行良好,我可以看到地图。但是当我加载时singned apk到我的手机地图没有显示...... :( ..有什么想法吗?
答案 0 :(得分:3)
这样做(假设keytool在你的路径中):
类型
keytool -genkey -v -keystore my-release-key.keystore -alias release_alias -keyalg RSA -keysize 2048 -validity 10000
You should see the following prompts:
Enter keystore password:
Re-enter new password:
What is your first and last name?
[Unknown]: FirstName Surname
What is the name of your organizational unit?
[Unknown]: FirstName Surname
What is the name of your organization?
[Unknown]: FirstName Surname
What is the name of your City or Locality?
[Unknown]: YourTown
What is the name of your State or Province?
[Unknown]: YourTown
What is the two-letter country code for this unit?
[Unknown]: UK
Is CN=FirstName Surname, OU=FirstName Surname, O=FirstName Surname, L=YourTown, ST=YourTown, C=UK c
orrect?
[no]: yes
Generating 2,048 bit RSA key pair and self-signed certificate (SHA1withRSA) with
a validity of 10,000 days
for: CN=FirstName Surname, OU=FirstName Surname, O=FirstName Surname, L=YourTown, ST=Lond
on, C=UK
Enter key password for <release_alias>
(RETURN if same as keystore password):
[Storing my-release-key.keystore]
此密钥库将位于您运行keytool命令的目录中,在我的情况下,它位于C:\ users \ FirstName
中现在,要查看生成的MD5指纹,请键入:
keytool -list -alias release_alias -keystore c:\ users \ FirstName \ my-release-key.keystore
你会看到:
Enter keystore password:
release_alias, 08-Sep-2010, PrivateKeyEntry,
Certificate fingerprint (MD5): **:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**
(** is substituted for my private information, you should see hex values)
这是您从RELEASE密钥生成的新MD5,将其提交到Google API密钥页,您将返回:
Thank you for signing up for an Android Maps API key!
Your key is:
1234567891bcdefg1234567891bcdefg (or whatever yours is)
This key is good for all apps signed with your certificate whose fingerprint is:
**:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**
将该密钥放入XML
答案 1 :(得分:1)
您需要创建一个用于签署应用程序的密钥。 对于你的这个键,你需要完成所有步骤,就像你使用自动生成的模拟器一样。
当您从eclipse中签署应用程序时,系统会询问您是否要创建密钥,创建密钥并记住存储密钥的位置。
然后转到C:\ Program Files \ Java \\ bin“并运行以下命令: 从命令窗口
keytool.exe -list -alias androiddebugkey -keystore“C:\ YourCreatedKey”-storepass android -keypass android
复制MD5证书指纹并将您的Web浏览器导航到:http://code.google.com/android/maps-api-signup.html。按照页面上的说明完成申请并获取Google地图密钥。
在xml布局中使用mapView控件中的获取键。