2011-11-30 81 views
2

我一直在使用版本2.3.3(API 10)開發Android應用程序。該應用程序只需使用Flickr Java API(flickrj)根據標籤,日期,地理信息等進行某些搜索查詢,並將搜索結果照片顯示給用戶。我一直在爲它工作2周,並使用我的HTC Sensation通過USB調試器進行調試。今天,我以某種方式開始得到一個令人討厭的警告信息,它反覆在我的LogCat中循環。它如下:Android 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的

回答

0

設置過濾器,例如使用所有的應用程序日誌一個speficic標籤和過濾對於這一點,所以系統日誌不會弄亂你

+0

但之前的消息不斷獲取刪除。即。當所有過濾器保存的過濾器中的消息太多時,其他過濾器也會開始擦除。 :s – prometheuspk

+0

不幸的是,那是因爲有一個LogCat緩衝區。但他們應該在一個新的ADT版本中使用它。 –

+0

@PeterV手頭上有同樣的問題我得到System.err:NoSuch MethodException等等在一個infifinte循環中,但是當它有一個設備連接時。我不得不在命令提示符下手動終止設備,以便循環停止。 – user285oo6