Android LogCat 不断重复警告 : "Addition of standard header .... not allowed"

标签 android debugging synchronization flickrj

我一直在使用 2.3.3 版 (API 10) 开发 Android 应用程序。该应用程序简单地使用 Flickr Java API (flickrj) 根据标签、日期、地理信息等进行某些搜索查询,并将搜索结果照片显示给用户。我已经为此工作了 2 周,并使用我的 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 Sync 应用程序),我需要它来设置 USB 驱动程序以便使用 PC 进行调试。但我不知道为什么 HTC Sync 会导致错误。

如果有人能分享他们对原因和可能的解决方案的想法,我将很高兴。感谢您的宝贵时间。

最佳答案

在 LogCat 中设置过滤器,例如在您所有的应用程序日志中使用特定的标签,并为此进行过滤,这样系统日志就不会让您感到困惑

关于Android LogCat 不断重复警告 : "Addition of standard header .... not allowed",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8319905/

相关文章:

java - 在选项卡式 Activity 中启用和禁用搜索操作

android - 如何创建 .pwd 文件来为 Bundle Tool 签名 APK 集?

android - 如何根据上下文使用不同的实现注入(inject)相同的 Dagger 2 依赖项?

c++ - 使用 Eclipse 调试时如何在 Linux 中查看 C++ shared_ptr 内容?

javascript - Twilio.Sync map 经常无法获取 300 多个项目

java - 在 Android 中的 TextView 上设置文本时出错

java - 简单计数器中的 android 清除按钮

windows - 使用 WinDBG 从调用堆栈中查找 URL

java - Java指南中关于并发的问题

c - 带有条件变量的简单生成器监控程序