简体   繁体   English

适用于Android的Google Maps and Places SDK在发行版APK中不起作用

[英]Google maps and Places SDK for android not working in release APK

I am working on google maps and places SDK for android , its working in debug apk but not working in release mode APK. 我正在使用Google Maps并放置适用于Android的SDK,它可以在调试APK中使用,但不能在发布模式APK中使用。

Setup steps: 设置步骤:

  1. Create project on google api console 在Google API控制台上创建项目
  2. Enabled google maps sdk and android places SDK 启用的Google Maps SDK和Android Places SDK
  3. Took SHA-1 fingerprint from google play console (app signing section) and added with package name into my generated key on google api console. 从Google Play控制台(应用程序签名部分)拿了SHA-1指纹,并以包名称添加到我在google api控制台上生成的密钥中。

Results: Both google map and places sdk work on debug mode but does not work when i create a release APK. 结果:Google Map和sdk都在调试模式下工作,但是当我创建发布APK时不工作。

Error: {statusCode:Error, resolution:null} 错误: {statusCode:Error, resolution:null}

Please suggest what can be issue. 请提出可能的问题。

Before publishing application into play store you have to follow some step to create release key. 在将应用程序发布到Play商店之前,您必须执行一些步骤来创建发布密钥。

1> First find your key store location. 1>首先找到您的密钥存储位置。
2> Run this command 2>运行此命令

keytool -list -v -keystore my-release-key.keystore

3> You will be asked keystore password . 3>系统将询问您密钥库密码。 Enter the keystore password that you placed while creating a release apk. 输入在创建发行版APK时放置的密钥库密码。
4> Copy SHA1 on your terminal Into your Google Console 4>将终端上的SHA1复制到Google控制台中
在此处输入图片说明

在此处输入图片说明

Add your package name and SHA-1 添加您的软件包名称和SHA-1 在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM