在模拟器谷歌地图的工作,但没有真实的设备 [英] Google-map work on emulator but doesn't on real device

查看:191
本文介绍了在模拟器谷歌地图的工作,但没有真实的设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我申请的具体步骤,在谷歌开发者文档中提到来创建一个示例谷歌地图工程,一切正常在模拟器上,但是当我生成项目apk文件并启动它真实的设备三星Galaxy S4谷歌地图不显示,仅显示一个空白的背景只是谷歌的彩色标志出现在左下屏幕角落!

I applied the exact steps as mentioned in the google developer doc to create an example google map project and everything went fine on the emulator, but when I generated the project apk file and launched it on real device Samsung Galaxy S4 google map doesn't show up it shows only a blank background with just colored Google logo appearing on the left lower screen corner !!

这可能是什么问题呢? plz帮助。

What could be the problem? Plz Help.

推荐答案

您将获得的.keystore .jks 文件生成的同时使用,你必须为应用程序创建指纹这是后来用于生成的谷歌开发者控制台

You will get .keystore or .jks file while generating signed APK.In fact using that you have to create the finger print for your application which is later used to generate Android Key in Google developer console.

现在你必须做的就是使用命令生成的SHA-1证书指纹

Now what you have to do is use the command to generate the SHA-1 certificate fingerprint

 keytool -list -v -keystore "path_to_jks_file.jks" -alias androiddebugkey -storepass android -keypass android

path_to_jks_file.jks 你应该给你生成时签署了您的 .jks 文件的路径APK。

In that path_to_jks_file.jks you should give the path of your .jks file that you got when generating signed APK.

,并从谷歌开发者控制台的Andr​​oid键,然后在清单中添加它

And get your android key from google developer console then add it in manifest

在这里输入的形象描述

和记得签约配置添加到您的的build.gradle

And remember to add the signing configuration to your build.gradle

signingConfigs {
        release {
            storeFile file("myreleasekey.jks")
            storePassword "password"
            keyAlias "MyReleaseKey"
            keyPassword "password"
        }
    }

签名应用程序

访问澄清。

这是阐述解释注册和API密钥

据我所知,这些信息的不够好,如果任何进一步解决您的issue.tell我。

AFAIK these information's good enough for resolving your issue.tell me if any further.

这篇关于在模拟器谷歌地图的工作,但没有真实的设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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