安卓:来调试运行的应用程序的正确方法(运行时错误/日志) [英] Android: The right way to debug an running application (runtime errors/log)
问题描述
我是新的Android开发。我一直在经历的教程。
I am new to Android development. I have been going through the tutorials.
我想知道这是调试正道/日志的应用程序。我猜我应该可以直接在Android设备上运行我的应用程序,并能查看日志左右捕捉运行时错误和日志?
I would like to know which is the right way to debug / log an application during its execution. I am guessing I should be able to execute my application directly on my android device and be able to view a log or so to catch runtime errors and logs?
我怎么能做到这一点?
我用这给我的手机上安装应用程序
I am using this to install the application on my phone
adb install <path to apk>
P.S。我相信这个问题似乎是我的东西应该已经知道了。但我无法弄清楚:)因此,我在这里:)
p.s. I am sure this question might seem like something I should already know. But I could not figure it out :) Hence I am here :)
推荐答案
您可以用ant编译命令行上。 请参阅本指南。
You can build on the command line with ant. See this guide.
&安培;通过使用亚行
在命令行上安装它。
& install it by using adb
on the command line.
adb install MyApp.apk
文件扩展的apk路径
path of apk with file extension
获取的logcat
或崩溃报告
做的是这样的:
adb logcat
请注意:确保只有一台设备连接到亚行桥。
note: make sure only one device is connected to
adb bridge
过滤:
for filtering:
这篇关于安卓:来调试运行的应用程序的正确方法(运行时错误/日志)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!