Android:调试正在运行的应用程序(运行时错误/日志)的正确方法 [英] Android: The right way to debug an running application (runtime errors/log)
问题描述
我想知道哪个是在执行期间调试/记录应用程序的正确方法。我想我应该能够直接在我的Android设备上执行我的应用程序,并且能够查看日志,以捕获运行时错误和日志。
完成这个?
我正在使用它来安装我的手机上的应用程序
adb install<到apk的路径>
p.s。我相信这个问题可能看起来像我应该已经知道的。但是我无法想像出来:)所以我在这里:)
你可以在蚂蚁的基础上建立命令行。 & 此。
I am new to Android development. I have been going through the tutorials.
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?
How could I accomplish this ?
I am using this to install the application on my phone
adb install <path to apk>
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 :)
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
path of apk with file extension
update
for getting logcat
or crash report
do this way:
adb logcat
note: make sure only one device is connected to
adb bridge
for filtering:
这篇关于Android:调试正在运行的应用程序(运行时错误/日志)的正确方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!