在Android真机调试时,如果在eclipse中看不到LogCat信息,提示是:
$ adb logcat info: log device is empty!
原因是系统默认关闭了log,需要将其打开。
解决方法:
http://stackoverflow.com/questions/6941710/unable-to-open-log-device-dev-log-main-no-such-file-or-directory
Dial this: *#*#2846579#*#*
Service menu will appear.
Go to “ProjectMenu” -> “Background Setting” ->
-> “Log Setting” //Log设置中,设置LOG开关为开
-> “Log level setting” and set the log level you wish. // 设置log级别为Verbose
Reboot the phone.
手机拨号: *#*#2846579#*#*
将会出现服务设置菜单.
选择 “ProjectMenu” -> “后台设置” ->
-> “Log 设置”,设置LOG开关为开
-> “Log 级别设置”,设置为自己希望的log level.
之后重启手机就OK啦。