remote logcat - Android Studio

痴心易碎 提交于 2019-12-10 16:36:54

问题


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.


回答1:


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

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.

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

Alternatives:

1. For logical Errors

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. For crash

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.



来源:https://stackoverflow.com/questions/50206889/remote-logcat-android-studio

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!