如何在 Android Studio 中打印到控制台? [英] How to print to the console in Android Studio?

查看:97
本文介绍了如何在 Android Studio 中打印到控制台?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚从以下位置下载了适用于 Linux 的 Android Studio:了解更多信息.

I just downloaded Android Studio for Linux from: http://developer.android.com/sdk/installing/studio.html

I'm wondering how to print to the console?

Neither System.out.print(...) nor Log.e(...) from android.util.Log seem to work.

解决方案

Run your application in debug mode by clicking on

in the upper menu of Android Studio.

In the bottom status bar, click 5: Debug button, next to the 4: Run button.

Now you should select the Logcat console.

In search box, you can type the tag of your message, and your message should appear, like in the following picture (where the tag is CREATION):

Check this article for more information.

这篇关于如何在 Android Studio 中打印到控制台?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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