我是否可以通过模拟器运行Android应用程序并将其打印字符串到我的计算机控制台?这里所说的控制台是指在正常的Java应用程序中期望看到System.out.println()输出的标准位置。因此,如果您从命令提示符中运行Java应用程序,则会在命令提示符中看到println()输出;如果您在Eclipse中运行该程序,则会在底部的“Console”选项卡中看到它。
使用Log.d("YourTag", "YourOutput");
请参阅http://developer.android.com/reference/android/util/Log.html
$ adb shell stop
$ adb shell setprop log.redirect-stdio true
$ adb shell start