2

在我的应用程序中,我使用的是 Google 地图版本 2。当我通过 Eclipse 在真实设备中运行应用程序时,意味着它会显示地图。但是当我将应用程序导出为已签名的 apk 并将我的 apk 上传到 Play 商店时。然后我下载上传的 apk来自Play商店的文件并在我的设备中运行它,但它只显示空白的白页。我不知道是什么问题。任何知道的可以帮助我解决这个问题。

4

6 回答 6

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.

我希望这对你来说已经足够了。如果有任何查询发表评论

于 2013-09-10T05:48:28.330 回答
1

要使用谷歌地图导出 APK,您必须在导出时使用释放密钥,而不是 debug.keystore。

使用此方法为 google map 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 指纹在 API 控制台上注册应用程序

我希望这会对您有所帮助....如果对您有帮助,请接受答案..谢谢享受编码

于 2013-09-10T06:25:13.200 回答
1

因为当您签署应用程序时,它的SHA1 指纹会发生变化。

因此,当您将其设为签名应用程序时,请使用 Eclipse 在签名过程中为您提供的 SHA1,并将其写入Google API CONSOLE中的允许应用程序

于 2013-09-10T05:38:46.620 回答
1

您正在使用调试密钥并导出您的 apk。使用释放键。希望这可能会有所帮助。

Google Map Android API v2 无法在 Play 商店应用程序中显示地图

于 2013-09-10T05:55:13.163 回答
1

您需要使用您的密钥库创建映射密钥。

1) 所以使用您的密钥库而不是 debug.keystore 生成 sha-1。

2)转到谷歌API控制台

3)为android生成新密钥

4) 并用你的包名传递这个新的 SHA-1

5)将该映射键放入您的代码中

于 2013-09-10T05:40:50.800 回答
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

并使用这个: https ://code.google.com/apis/console/?pli=1

于 2013-09-10T05:42:46.103 回答