我一直在使用2.3.3版(API 10)开发一个Android应用程序。该应用程序只需使用Flickr Java API (flickrj)根据标签、日期、地理信息等进行特定的搜索查询,并将搜索结果照片显示给用户。我已经花了两个星期的时间用我的HTC Sensation通过USB调试器对它进行调试。今天,不知何故,我开始收到一条烦人的警告信息,它在我的LogCat中一遍又一遍地循环。具体如下:
11-30 00:31:43.083: I/org.restlet(22899): Couldn't find the mandatory "Host" HTTP header.
11-30 00:31:43.143: D/com.fd.httpd(22899): sdcard phone type != 1
11-30 00:31:43.143: D/com.fd.httpd(22899): emmc phone type != 1
11-30 00:31:43.163: I/LogService(22899): 2011-11-30 00:31:43 127.0.0.1 - 127.0.0.1 8182 GET /info/ - 200 1143 0 52 http://null - -
11-30 00:31:43.163: I/Server(22899): Addition of the standard header "pragma" is discouraged as a future versions of the Restlet API will directly support it.
11-30 00:31:43.163: W/Server(22899): Addition of the standard header "cache-control" is not allowed. Please use the equivalent property in the Restlet API.
11-30 00:31:43.163: W/Server(22899): Addition of the standard header "expires" is not allowed. Please use the equivalent property in the Restlet API.当我关机或重新启动手机时,警告消息不再循环显示。但是,当我开始使用USB调试器处理我的应用程序时,警告在一段时间后开始再次出现。我可以继续开发/调试我的应用程序而不会出现问题,但是由于这些警告挤满了LogCat窗口,所以很难跟踪发生了什么。
我已经检查过是否有其他人有同样的问题,我得到的唯一线索是检查警告中重复出现的pid数: 22899。此pid号属于软件包"com.fd.httpd“(HTC同步应用程序),它是我设置用于PC调试的USB驱动程序所必需的。但我不知道为什么HTC Sync会导致错误。
如果有人能分享他们关于原因和可能的解决方案的想法,我将很高兴。谢谢您抽时间见我。
发布于 2011-11-30 09:14:46
在LogCat中设置过滤器,例如在所有应用程序日志中使用特定标签,并对其进行过滤,这样系统日志就不会对您造成混乱
https://stackoverflow.com/questions/8319905
复制相似问题