开发者

Android: Where log cat goes while running on device?

I'm using Eclipse on mac for developing android apps. When I run the application on emulator开发者_运维问答 the log cat window shows what is expected and do work fine but when I run(or even debug) on real android connected device my log cat window doesn't show even a single line.

How to deal with log cat when running on real android devices?

Thanks,


You have to select the device in the DDMS environment, Windows tab, select "Devices", and then select your device, i.e. "HtXXXXXXX".


First, Is device really connected? To check whether the device is connected or not, just run adb devices on console. It will list all the devices attached to the system.

Second, just run the adb logcat command at the command prompt, it will display the logcat window separately.

While many devices are attached to a system, adb logcat will display the following message: - waiting for device - error: more than one device and emulator

so to resolve above case, you have to run the command with device id with -s option.

For example: adb -s emulator-5556 logcat , this will display the logcat for emulator.


Try just to restart it when you connected to device.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜