上载到Google Play后,谷歌地图不显示 [英] google maps doesnt show after upload to google play

查看:181
本文介绍了上载到Google Play后,谷歌地图不显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将我的应用程序上传到了Google Play商店,但该地图无效,仅显示了白色屏幕.我了解我必须获得基于发行证书指纹的密钥.我已尝试阅读所有相关内容,并已完成以下操作,但仍无法正常工作:

I uploaded my app to the google play store, and the map didn't work, just showed white screen. I understand that I have to get a key based on the release certificate fingerprint. I have tried to read all about it, and have done the following, but it still isn't working:

我从Android Studio创建了一个新的密钥库(带有密码,别名和密码等).

I created a new keystore (with password, and alias and password etc) from Android Studio.

我运行cmd并执行以下操作:

I run the cmd and did this:

keytool -list -v -keystore key.jls -alias MyPlaces

keytool -list -v -keystore key.jls -alias MyPlaces

然后输入我的密码,并获得我需要的所有信息.根据我得到的sha1指纹结果,我为Google Maps和Places api生成了一个密钥.我输入了包裹名称.我将Alias代码放回我的应用程序中以获取密钥.

then put in my password, and got all the information that I need. I generated a key for google maps and places api, based on the sha1 fingerprint result that I got. I put in my package name. I put the Alias code back into my app for the key.

但是它仍然不起作用.我知道其他人遇到了这个问题,但是对他们有帮助的却对我没有帮助.

But it still doesn't work. I know others have had this problem, but what helped for them hasn't helped me.

为什么?我希望我写的清楚.谢谢

Why? I hope its clear what i wrote. Thanks

每次检查到Play商店时,我都不会上传它.而是我创建了签名的apk,然后尝试从我的手机运行它.这有事吗?

I am not uploading it each time i check to the play store. Rather i create the signed apk, then try to run it from my phone. DOes this matter?

这是我在日志中看到的消息.

This is the message I get in the logs.

06-22 23:10:07.529 6500-6543/? E/b:服务器上的身份验证失败.

06-22 23:10:07.529 6500-6543/? E/b: Authentication failed on the server.

06-22 23:10:07.530 6500-6543/? E/Google Maps Android API:授权失败.请参阅 https://developers.google.com/maps/documentation/android-api /start 了解如何正确设置地图.

06-22 23:10:07.530 6500-6543/? E/Google Maps Android API: Authorization failure. Please see https://developers.google.com/maps/documentation/android-api/start for how to correctly set up the map.

06-22 23:10:07.536 6500-6543/? E/Google Maps Android API:在Google Developer Console( https://console.developers.google.com )

06-22 23:10:07.536 6500-6543/? E/Google Maps Android API: In the Google Developer Console (https://console.developers.google.com)

确保已启用"Google Maps Android API v2".

Ensure that the "Google Maps Android API v2" is enabled.

确保存在以下Android密钥:

Ensure that the following Android Key exists:

API密钥:YOUR_KEY_HERE

API Key: YOUR_KEY_HERE

Android应用程序(;):38:.. F0; com ..... myplaces(出于安全考虑,我已删除了此内容

Android Application (;): 38:.......F0;com.....myplaces (I have deleted this for security)

推荐答案

这是.

在我的日志中显示:

API Key: YOUR_KEY_HERE

Google自动创建资源文件googles_maps_api.xml,并在其中创建字符串引用:

Google automatically makes a resource file, googles_maps_api.xml and in there the string reference:

<string name="google_maps_key" templateMergeStrategy="preserve" translatable="false">AIza....DOWdQ</string>

在编译时,它不会识别此字符串.我在strings.xml文件中创建了一个字符串资源,然后它起作用了.

When compiled, it wan't identifying this string. I made a string resource in the strings.xml file, and then it worked.

这篇关于上载到Google Play后,谷歌地图不显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆