简体   繁体   English

从Android Alpha / Beta版本中捕获应用程序console.log?

[英]Capture app console.log from an Android alpha/beta release?

Working on a Cordova app: 使用Cordova应用程序:

We are trying to find a way to capture JSON results of an in-app transaction. 我们正在尝试找到一种捕获应用内交易的JSON结果的方法。 In debug mode, we have access to the console, but in-app billing is disabled; 在调试模式下,我们可以访问控制台,但是应用内结算被禁用; when we've pushed an alpha or beta release to our GDC, the in-app billing works but we do not have access to the console. 当我们将Alpha或Beta版本发布到我们的GDC后,应用程序内结算有效,但我们无权访问控制台。 We use variations of pop-up alerts but this is a flaky solution. 我们使用各种弹出警报,但这是一个不稳定的解决方案。 The main annoyance stems from having to build & upload to GDC every time we want to test new things that have to do with in-app billing. 主要的烦恼来自每次我们要测试与应用内结算有关的新事物时,都必须构建并上传到GDC。 Surely there is something we're missing. 当然,我们缺少一些东西。

Is there a way to read the console (or any output of that sort) from a built Android app? 有没有办法从内置的Android应用读取控制台(或任何此类输出)?

First of all plug your device to computer, from Android Studio, choose Tools > Android Device Monitor or click the Android Device Monitor icon. 首先,将设备插入计算机,然后从Android Studio中选择“工具”>“ Android设备监视器”或单击“ Android设备监视器”图标。 This will show your device and apps running on it. 这将显示您的设备和在其上运行的应用。 You can filter type of logs it is showing (because at moment device shows lot of logs). 您可以过滤显示的日志类型(因为此刻设备显示大量日志)。

But if you use command line then , in the SDK tools/ directory, enter the following command : 但是,如果您使用命令行,则在SDK tools /目录中,输入以下命令:
monitor
It will also open monitor tool. 它还将打开监视工具。 Here is documentation to this tool. 这是此工具的文档

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

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