在我的应用程序中使用谷歌地图版本2.当我在真实设备中通过eclipse运行应用程序意味着它显示地图。但是当我将应用程序导出为已签名的apk并在播放商店上传我的apk时。然后我下载从Play商店上传的apk文件,我在我的设备上运行但它只显示空白页面。我不知道问题是什么。任何知道。请帮助我解决这个问题。
答案 0 :(得分:7)
您必须要求signed apk with SHA-1
第1步:
Now locate to jdk in C drive(Considering for windows and assigning C drive)
C:\Program Files\Java\jdk1.7.0\bin>keytool -list -v -keystore E:\A.keystore -alias A
So it will create SHA-1 finger print
第2步:
Go to google api console.
Generate new api key for android you have to used this SHA-1 and current playstore package name.
Put Api key into your map.
我希望这对你来说已经足够了。如果查询发表评论。
答案 1 :(得分:1)
因为当您签署应用程序时, SHA1指纹会发生变化。
所以当你使用已签名的应用程序时,请选择eclipse在签署过程中给你的SHA1并将其写入Google API CONSOLE中的允许应用程序
答案 2 :(得分:1)
您需要使用密钥库创建地图密钥。
1)所以使用你的密钥库而不是debug.keystore生成sha-1。
2)转到google api console
3)为android生成新密钥
4)并使用您的包名称
传递这个新的SHA-15)将那个地图密钥放在你的代码中
答案 3 :(得分:1)
这是因为在您导出应用程序的签名apk之后,其SHA1指纹会发生变化。
所以你需要这样做:
1) Generate sha-1 using your keystore rather debug.keystore.
2) Go to google api console
3) generate new key for android
4) and pass this new SHA-1 with your package name
5) put that map key in your code
答案 4 :(得分:1)
您正在使用调试密钥并导出apk。使用释放键。希望这可能有所帮助。
Google Map Android API v2 can't display map in play store application
答案 5 :(得分:1)
要使用谷歌地图导出APK,您必须在导出时使用释放键而不是debug.keystore。
使用此方法为Google Maps API v2生成发布密钥。
C:\Program Files\Java\jdk1.6.0_45\bin>keytool -genkey -v -keystore "C:\Users\cp
01\.android\releasekey.ketstore" -alias release_alias -keyalg RSA -keysize 2048
-validity 10000
Enter keystore password:
Re-enter new password:
What is your first and last name?
[Unknown]:
What is the name of your organizational unit?
[Unknown]:
What is the name of your organization?
[Unknown]:
What is the name of your City or Locality?
[Unknown]:
What is the name of your State or Province?
[Unknown]:
What is the two-letter country code for this unit?
[Unknown]:
Is CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown correct?
[no]: yes
Generating 2,048 bit RSA key pair and self-signed certificate (SHA1withRSA) wit
a validity of 10,000 days
for: CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknow
Enter key password for <release_alias>
(RETURN if same as keystore password):
Re-enter new password:
[Storing C:\Users\cpc01\.android\releasekey.ketstore]
C:\Program Files\Java\jdk1.6.0_45\bin>keytool -list -v -alias release_alias -ke
store c:\Users\cpc01\.android\releasekey.ketstore
Enter keystore password:
Alias name: release_alias
Creation date: Jul 25, 2013
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown
Issuer: CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown
Serial number: 51f0c02c
Valid from: Thu Jul 25 11:35:32 IST 2013 until: Mon Dec 10 11:35:32 IST 2040
Certificate fingerprints:
MD5: your md5 Fingure print
SHA1: your SHA1 fingure print
Signature algorithm name: SHA1withRSA
Version: 3
现在使用SHA1 fingure print在API控制台上注册应用程序
我希望这会对你有所帮助.... 如果对你有帮助,接受答案..谢谢 享受编码