如何在未调试的发行版中运行android应用? [英] How to run android app in release not in debug?

查看:113
本文介绍了如何在未调试的发行版中运行android应用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用中,我正在使用Google地图.现在,我意识到您拥有一个构建Google Maps Key并发布了Google Maps Key.当我将签名的apk启动到应用商店中以测试google maps屏幕时,显示为灰色.而且我必须继续签署新的APK并将其加载到Play商店中,然后对其进行测试.

In my app I'm using google maps. Now, I realized that you have a build google maps key and release google maps key. When I launch my signed apk into the app store for testing the google maps screen goes grey. And i have to keep signing a new apk and loading it into play store and then test it.

如何测试发布版本?请提供非常简单易行的逐步说明,或者如果您知道如何解决Google地图问题,将对您有所帮助.

How do I test a release build? Please provide very simple and easy step by step instructions or if you know how to solve the problem with google maps that would be helpful.

这是我如何在控制台中为发布版本1设置google maps api的屏幕截图.

Here is a screen shot of how i set up my google maps api in the console for my release one.

推荐答案

测试发布版本

  1. 打开Build Variants

  1. debug设置为release

构建并运行

用于灰屏 一旦在开发控制台中设置了发行版SHA

For gray screen Once you have got the release SHA set in dev console

  • 这是我大部分时间都忘记的主要原因

您有两个 google_maps_api.xml 文件

此文件夹中的一个:

app/src/调试/res/values

app/src/debug/res/values

此文件夹中的其他:

app/src/版本/res/values

app/src/release/res/values

但是只有调试一个可能包含您的API密钥.

But only the debug one contains your API key probably.

这篇关于如何在未调试的发行版中运行android应用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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