在我的应用程序中使用谷歌地图版本2.当我通过eclipse在真实设备中运行应用程序意味着它显示地图。但是当我导出应用程序作为签名apk并在播放商店上传我的apk.Then我下载上传的apk来自Play商店的文件,我在我的设备中运行,但它只显示空白页面。我不知道是什么问题。任何知道。请帮我解决这个问题。
您必须要求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.
我希望这对你来说已经足够了。如果有任何疑问都会发表评论 。
因为当您签署应用程序时,它的SHA1指纹会发生变化。
所以当你把它作为一个签名的应用程序时,请使用eclipse在签署过程中给你的SHA1并将其写入Google API CONSOLE中的允许应用程序
您需要使用密钥库创建映射密钥。
1)所以使用你的密钥库而不是debug.keystore生成sha-1。
2)转到谷歌api控制台
3)为android生成新密钥
4)并使用您的包名传递这个新的SHA-1
5)将该映射键放在代码中
这是因为在您导出应用程序的签名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
您正在使用调试密钥并导出您的apk。 使用释放键。 希望这可能有所帮助。
要使用谷歌地图导出APK,您必须在导出时使用释放键而不是debug.keystore。
使用此方法为Google Maps API v2生成Release键。
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控制台上注册应用程序
我希望这会对你有所帮助....如果对你有帮助,请接受答案..谢谢享受编码