Android 谷歌地图在我的电脑之外无法使用 [英] Android Google Maps not working outside my computer

查看:31
本文介绍了Android 谷歌地图在我的电脑之外无法使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我和两个同事在做一个使用Android Studio的项目,我们需要使用谷歌地图,但是每次都出现这个问题.当我编译并在我的 PC Android Studio 上运行该应用程序时,一切正常,谷歌地图也能正常工作,但是当我将项目发送给我的其中一位同事时,当他们尝试在手机上运行该应用程序时,谷歌地图只显示灰色屏幕,只显示按钮而不显示地图.我们共享由我自己生成的相同密钥.项目中实现的 minSdkVersion 覆盖了我们所有的手机.我们尝试了几种方法,但似乎都没有解决问题,例如为每个方法生成不同的密钥.唯一似乎有效的是,如果我使用他们的手机通过我的计算机运行该应用程序,这是该应用程序显示地图的唯一方式.

I'm doing a project with two colleagues using Android Studio, where we need to use google maps, however this problem has appeared everytime. When I compile and have the app running on my pc Android Studio everything works great and google maps works however when I send the project to either one of my colleagues when they try and run the app on their phones Google Maps only shows a grey screen, showing only the buttons but not the maps. We share the same keys generated by myself. The minSdkVersion implemented on the project covers all our phones. We have tried several things and none of them seemed to solve problem, like generating different keys for each one of them. The only thing that seems to work is if I run the app using their phones through my computer, it's the only way that the app will show the maps.

任何帮助将不胜感激

推荐答案

您生成的 API 密钥与其密钥库不匹配.此密钥是使用您的密钥库的 SHA1 生成的.确保你们都拥有相同的密钥库.每次安装 Android Studio 都会创建一个新的调试密钥库.您应该确保使用相同的密钥库.

The API key you've generated does not match their keystore. This key is generated with the SHA1 of your keystore. Make sure you all have the same keystore. Each install of Android Studio creates a new debug-keystore. You should make sure you use the same keystore.

这篇关于Android 谷歌地图在我的电脑之外无法使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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