为什么logcat在我的Android中不显示任何东西(当用Eclipse开发应用程序时)?

它只是不打印任何东西。它是空的。


当前回答

如果您正在使用设备,最简单的检查就是重新启动Eclipse。

您不必关闭Eclipse

使用菜单文件→重新启动

在一两秒钟内,您应该会看到LogCat返回。

其他回答

一加设备和Ubuntu操作系统:

Install Wine on Ubuntu Install ADB tools on Ubuntu sudo apt-get install android-tools-adb Now, attach your device to PC with USB. Open mounted "One Plus Drivers". A disc like icon Right click on OnePlus_USB_Drivers_setup.exe and run with Wine Then open the terminal in the present drive where your "OnePlus_USB_Drivers_setup.exe" and other driver files exists. And run ./adb_config_Linux_OSX.sh or sh adb_config_Linux_OSX.sh Close this terminal Open a new terminal and run adb server-start

你的一加设备会提示你将PC识别为调试代理。

现在,在终端上运行。它应该会显示你的设备。

adb devices

参考:[解决]Android Studio不识别我的一加二在Linux

虽然MoMo提供的答案可以暂时解决这个问题,但它很可能在下次启动Eclipse或在不同的模拟器/设备上启动时再次出现。

我发现一个更好的解决方案是进入您的Eclipse首选项,并在左侧列表中导航到Android -> LogCat,然后启用“监控LogCat用于工作空间中应用程序的消息”。

这样,无论您使用什么设备,只要应用程序启动,logcat就会自动开始显示它的输出。

它还将设置一个过滤器,以确保只显示应用程序的输出,您可以根据需要重用/禁用该过滤器。

在我的情况下(在尝试了这里提供的所有答案后都无济于事),问题(和解决方案)与端口8700有关:

我需要做的是:

退出“Android设备监视器”(Monitor .bat) 退出Eclipse的所有实例。 C: \ adt-bundle-windows-x86_64 \ sdk > . . \平台工具\ \工具adb.exe kill-server C: \ adt-bundle-windows-x86_64 \ sdk > . . \平台工具\ \工具adb.exe启动服务器 C: \ adt-bundle-windows-x86_64 \ sdk \工具> monitor.bat

此外,滚动锁定按钮,需要“按下/激活”:

而不是反过来:

除了重新启动Eclipse,对我有用的还有:

删除自定义过滤器

删除所有过滤器后,logcat再次被文本填充

也许你安装了Mylyn ?

http://code.google.com/p/android/issues/detail?id=1808