我在哪里可以查看日志,如果我已经在电话上安装的应用程序? [英] Where I can see the Log, If I have installed application on Phone?

查看:137
本文介绍了我在哪里可以查看日志,如果我已经在电话上安装的应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在哪里可以查看日志,如果我已经在电话上安装的应用程序? 例如像

Where I can see the Log, If I have installed application on Phone? Example like

Log.v(TAG,现状是 - +状态);

我的应用程序崩溃时,来电来。所以,我怎么可以跟踪日志或错误?

My application is crashing when incoming call comes. So how can I trace the Log or Error?

推荐答案

如果您已经安装了亚洲开发银行(作为我认为你这样做),你只需通过USB将手机连接到你的电脑,启用调试模式,输入:

If you have ADB installed (as I assume you do), you just connect your phone to your computer via USB, enable debugging mode, and type in:

adb -d logcat

从您的计算机上的命令行。大量的输出会显示出来,并且可以滚动找到你正在寻找的输出。

from the command line on your computer. A lot of output will show up, and you can scroll through to find the output you are looking for.

您也可以只显示特定的标记,如 FOOBAR

You can also show only specific tags, such as FOOBAR:

adb -d logcat -s FOOBAR

通过使用此命令,可以过滤出未捕获的异常,这是非常有用的调试:

By using this command, you can filter out only uncaught exceptions, which is useful for debugging:

adb -d logcat -s AndroidRuntime:E

您可以阅读更多有关的logcat 这里

You can read more about logcat here.

这篇关于我在哪里可以查看日志,如果我已经在电话上安装的应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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