安卓:来调试运行的应用程序的正确方法(运行时错误/日志) [英] Android: The right way to debug an running application (runtime errors/log)

查看:126
本文介绍了安卓:来调试运行的应用程序的正确方法(运行时错误/日志)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新的Andr​​oid开发。我一直在经历的教程。

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屋!

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