首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Android LogCat不断重复警告:“添加标准头部...不允许”

Android LogCat不断重复警告:“添加标准头部...不允许”
EN

Stack Overflow用户
提问于 2011-11-30 09:04:51
回答 1查看 1.1K关注 0票数 2

我一直在使用2.3.3版(API 10)开发一个Android应用程序。该应用程序只需使用Flickr Java API (flickrj)根据标签、日期、地理信息等进行特定的搜索查询,并将搜索结果照片显示给用户。我已经花了两个星期的时间用我的HTC Sensation通过USB调试器对它进行调试。今天,不知何故,我开始收到一条烦人的警告信息,它在我的LogCat中一遍又一遍地循环。具体如下:

代码语言:javascript
复制
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会导致错误。

如果有人能分享他们关于原因和可能的解决方案的想法,我将很高兴。谢谢您抽时间见我。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2011-11-30 09:14:46

在LogCat中设置过滤器,例如在所有应用程序日志中使用特定标签,并对其进行过滤,这样系统日志就不会对您造成混乱

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/8319905

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档