简体   繁体   English

在不通过USB连接到Android Studio的情况下获取堆栈跟踪

[英]Getting stack trace without connection to android studio via USB

Is there a way to get the stack trace without being connected via USB to android studio when the application crash? 当应用程序崩溃时,有没有一种方法可以获取堆栈跟踪而无需通过USB连接到android studio?

I am developing an application where the phone needs to be connected to another USB device. 我正在开发一个需要将手机连接到另一个USB设备的应用程序。 At some point the app crash, and because I'm not connected to android studio I cant see the stack. 在某个时刻,应用程序崩溃了,因为我没有连接到android studio,所以看不到堆栈。 Any suggestions how to get the stack trace after the crash? 关于崩溃后如何获取堆栈跟踪的任何建议?

You can debug an app and view logcat via adb over wi-fi allowing you to keep the usb free. 您可以调试应用并通过Wi-Fi通过ADB查看logcat,从而使USB保持免费。 It's very simple to set up and works well. 设置非常简单,效果很好。 https://developer.android.com/studio/command-line/adb.html#wireless https://developer.android.com/studio/command-line/adb.html#wireless

You can just use logcat after the fact. 事实结束后,您只能使用logcat。 All AS does is use logcat with a filter for the process creating the messages. 所有AS所做的就是在创建消息的过程中使用带过滤器的logcat。 That still requires you to attach the device soon afterwards. 仍然需要您稍后再连接设备。

The other option would be to use something like ACRA to set up a system to email/send crashes to a webservice. 另一种选择是使用ACRA之类的工具来设置系统,以将崩溃通过电子邮件发送/发送到Web服务。

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

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