困擾了一個(gè)晚上, 這個(gè)問(wèn)題太煩了!
做一個(gè)android xmpp項目。 用了asmack包
同樣的代碼,同樣的build path, 在我機子上就是不能運行,在小俠機子就可以!
一開(kāi)始提示“ Android java.lang.VerifyError exception ”, 但沒(méi)提示在哪出錯。
只知道是調用asmck包里的方法時(shí)出錯了!
繼續追蹤, 提示
Could not find class ‘org.jivesoftware.smack.ConnectionConfiguration’
我就淚崩了! 明明導入了asmack的包呀。 刪除項目,重新導入項目, 重新導入包, 重啟??!
甚至換了一下打開(kāi)電腦的姿勢! 我怕是姿勢不對啊親?。?!
最終還是google幫了我。
在這里我看到了一線(xiàn)生機:
評論里有人說(shuō)道:
“possible duplicate of Libraries in SDK 17 – android,”
我擦咧, 我不就才剛升級了ADT嘛! 繼續看:
http://stackoverflow.com/questions/9846586/libraries-in-sdk-17-android 里面寫(xiě)到:
If you have ClassDefNotFoundError after updating to r17, make sure to read the following links:
http://android.foxykeep.com/dev/how-to-fix-the-classdefnotfounderror-with-adt-17 shows how to fix the problem with nice pictures of what the project should look like.
我擦。。。就是這個(gè)惹的貨! 一晚上的時(shí)間就這樣沒(méi)了?。?!
聯(lián)系客服