远程logcat-Android Studio [英] remote logcat - Android Studio

查看:298
本文介绍了远程logcat-Android Studio的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以查看远程设备上的应用程序的日志记录,简而言之,是否可以远程记录日志?

Is it possible to see the logcat of an app that is on a distant device, in short, is it possible to logcat remotely?

我向客户端发送了一个应用程序,这给您的设备带来了错误,我在相同版本的仿真器上进行了测试,但该错误仅是由它引起的.

I sent an app to a client, this is giving error in your device, I tested with the emulator in the same version, but the error only occurred with it.

推荐答案

是否有可能看到遥远的应用程序的日志记录 简而言之,该设备可以远程登录吗?

Is it possible to see the logcat of an app that is on a distant device, in short, is it possible to logcat remotely?

可以通过wifi连接设备以执行调试.您可以参考此文档.但是,它的局限性在于,设备和主机都需要连接到通用wifi.

It is possible to connect device over wifi to perform debugging. You can refer to this document. However, it has limitation that both the device and the host needs to be connected to common wifi.

由于您的设备位于客户住所中,并且无法在普通wifi下使用,因此没有其他方法可以执行远程调试.

Since your device is in customer premises and cannot be under common wifi, there is no other way to perform remote debugging.

1.对于逻辑错误

最好的选择是将日志存储在本地目录(内部存储或SdCard)中,并要求您的客户发送这些日志.您可以使用类似 logback-android 之类的库来简化此功能安逸.您只需要执行一些配置即可.

The best alternative would be to store logs in local directory (Internal storage or SdCard) and ask your customer to send these logs. You can use libraries like logback-android which facilitates this functionality at ease. You just need to perform some configuration.

2.崩溃

您可以集成一些崩溃分析,例如Hockey app,它将通知崩溃以及相关的stacktrace.如果您需要有关前提条件的详细信息,则必须选择替代方法1.

You can integrate some crash analytics like Hockey app which will notify the crash along with the related stacktrace. If you want detailed information about pre-condition then you have to go for Alternative 1.

这篇关于远程logcat-Android Studio的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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