Android的logcat的连续重复的警告:"标准头的加入....不准" [英] Android LogCat continuously repeating a warning: "Addition of standard header .... not allowed"

查看:315
本文介绍了Android的logcat的连续重复的警告:"标准头的加入....不准"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在开发使用版本2.3.3(API 10)的Andr​​oid应用程序。该应用程序只需使用Flickr的API的Java(flickrj),使基于标签,日期,地理信息等某些搜索查询和显示搜索结果的照片给用户。我一直在努力于它的2周,用我的HTC感觉通过USB调试器来调试。今天,我莫名其妙地开始得到循环一遍又一遍地在我的LogCat中恼人的警告信息。它如下所示:

I've been developing an Android application using version 2.3.3 (API 10). The application simply uses Flickr Java API (flickrj) to make certain search queries based on tags, date, geographical info etc. and displays the search result photos to the user. I have been working on it for 2 weeks and using my HTC Sensation to debug it via the USB debugger. Today, I somehow started to get an annoying warning message that loops over and over in my LogCat. It is as follows:

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中的窗口,它变得非常难以追查这是怎么回事。

When I shut down or restart my phone, the warning messages are no longer looped. But when I begin to play around with my application using the USB debugger, the warnings begin to show up again after a while. I can keep on developing/debugging my application without a problem, but since these warnings are crowding the LogCat window, it becomes very difficult to trace what's going on.

我检查,看看是否有人有同样的问题,我已经得到了唯一的线索是检查中的警告反复的PID号:22899.这个PID号属于包com.fd.httpd这是需要我安装调试的USB驱动器与PC(HTC Sync应用程序)。但我不知道为什么宏达同步导致错误。

I've checked to see if anyone else had the same problem and the only clue I've got is to check the pid number repeated in the warnings: 22899. This pid no belongs to the package "com.fd.httpd" (HTC Sync application) which is required for me to setup the USB driver for debugging with a PC. But I have no idea why HTC Sync is causing an error.

我会很高兴,如果任何人都可以分享他们的原因和可能的解决思路。感谢您的时间。

I would be glad if anyone could share their ideas about the reason and a possible solution. Thank you for your time.

推荐答案

在LogCat中设置过滤器,例如用在所有的应用程序日志,一个speficic标签和过滤器,因此系统日志就不会弄乱你。

Set up filters in LogCat, for example use a speficic tag in all your apps logs, and filter for that, so system logs will not clutter you

这篇关于Android的logcat的连续重复的警告:"标准头的加入....不准"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆