Android开发
System.out.println();用这条语句是不能将信息打印到控制台的。

需要用到Log
android.util.Log

windows ==> Preferences ==> Android ==> DDMS  ==> Logging Level

 
设置日志级别,选中之下的将被显示,选中之上的不被显示。

windows ==> Show View ==> Android ==> LogCat

 
显示LogCat栏目。

Summary

Constants

int
ASSERT
Priority constant for the println method.

int
DEBUG
Priority constant for the println method; use Log.d.

int
ERROR
Priority constant for the println method; use Log.e.

int
INFO
Priority constant for the println method; use Log.i.

int
VERBOSE
Priority constant for the println method; use Log.v.

int
WARN
Priority constant for the println method; use Log.w.

private static final String TAG = "MyActivity";

and use that in subsequent calls to the log methods.

Tip: Don't forget that when you make a call like

Log.v(TAG, "index=" + i);
学习交流>^<欢迎拍砖

更多相关文章

  1. JNI基础实验一:调用.so文件--友善之臂Tiny210 android 串口/pwm/A
  2. 蓝牙搜索显示结果到ListView(十分精简)
  3. Android(安卓)7.0 SystemUI(2)--Multi-Window多窗口模式
  4. 面试例题6:两种方法将图像显示在View上
  5. ListView的一些属性
  6. 在Android中实现全屏显示的方法
  7. 在android上使用ASCII显示特殊符号
  8. Android自定义Toast,并解决toast不重复显示
  9. xml-----属性收集

随机推荐

  1. 在Android中查看和管理sqlite数据库
  2. Android(安卓)Studio 如何引用aar包
  3. Android(安卓)核心分析 之八------Androi
  4. Android中视频播放以及解码
  5. 设置TextView文字居中,代码实现android:l
  6. 关于Android(安卓)Studio 模拟器“ANDROI
  7. 如何查看无法导出的android数据库文件?
  8. 关于ImageView的一些图片属性
  9. Android核心模块及相关技术
  10. Android本地数据存储之Sharedpreference