使用eclipse开发android应用已经一年多了,但今天很不辛的遇到了logcat报错:Could not create the view: For input string: "";再也使用不了logcat调试程序了,为了能正常调试,开始查找出错原因并解决它,因为ADT的版本不是最新的,所以先更新到最新版本,然后重启eclipse但是问题依旧,在eclipse安装目录中查看安装文件没发现能修正此问题的解决方法,无奈之下更换个新的工作空间后发现logcat可以正常显示了,仔细查看工作空间中的setting文件夹中的配置,终于发现了问题所在:
出此错的原因是Logcat视图中的filter包含了“:”;
解决方法是:更改eclipse的工作空间(workspace)中的文件“.metadata/.plugins/org.eclipse.core.runtime/.settings/com.android.ide.eclipse.ddms.prefs”。
将com.android.ide.eclipse.ddms.logcat.filters值设为空即可。