2012-04-16 95 views
3

我使用傑克遜JSON解析器,我已經添加了「傑克遜 - 全1.9.3.jar」,當我宣佈找不到類'org.codehaus.jackson.map.ObjectMapper'?

ObjectMapper objectMapper = null; 

編譯器承認它,但是當我在模擬器上運行我的應用程序獲得這個錯誤。

04-16 16:27:13.037: I/System.out(435): waiting for debugger to settle... 
04-16 16:27:13.245: I/System.out(435): debugger has settled (1417) 
04-16 16:27:13.734: E/dalvikvm(435): Could not find class 'org.codehaus.jackson.map.ObjectMapper', referenced from method com.test.weather.GetweatherInfo.<init> 
04-16 16:27:13.734: W/dalvikvm(435): VFY: unable to resolve new-instance 45 (Lorg/codehaus/jackson/map/ObjectMapper;) in Lcom/test/weather/GetweatherInfo 

我該怎麼辦才能解決它謝謝。

+1

http://stackoverflow.com/questions/10005206/twitter4j-androidruntime446-java-lang-noclassdeffounderror-twitter4j-http/10007966#10007966可能出現這種情況 – MKJParekh 2012-04-16 09:13:07

+0

這是它謝謝:) – Vervatovskis 2012-04-16 09:34:00

回答

4

您需要從lib改變你的文件夾名稱libs爲您更新ADT 17

結算此Article瞭解有關此主題的詳細信息。

+0

我仍然得到這個錯誤我的文件夾名是從頭開始 – Signcodeindie 2013-01-22 03:18:30

+0

好吧,我想通了,不得不將jar文件複製到libs文件夾。謝謝! – Signcodeindie 2013-01-22 03:20:20