困擾了一個晚上, 這個問題太煩了!
做一個android xmpp項目。 用了asmack包
同樣的代碼,同樣的build path, 在我機子上就是不能運行,在小俠機子就可以!
一開始提示“ Android java.lang.VerifyError exception ”, 但沒提示在哪出錯。
只知道是調(diào)用asmck包里的方法時出錯了!
繼續(xù)追蹤, 提示
Could not find class ‘org.jivesoftware.smack.ConnectionConfiguration’
我就淚崩了! 明明導(dǎo)入了asmack的包呀。 刪除項目,重新導(dǎo)入項目, 重新導(dǎo)入包, 重啟?。?/p>
甚至換了一下打開電腦的姿勢! 我怕是姿勢不對啊親?。。?/p>
最終還是google幫了我。
在這里我看到了一線生機:
評論里有人說道:
“possible duplicate of Libraries in SDK 17 – android,”
我擦咧, 我不就才剛升級了ADT嘛! 繼續(xù)看:
http://stackoverflow.com/questions/9846586/libraries-in-sdk-17-android 里面寫到:
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.
我擦。。。就是這個惹的貨! 一晚上的時間就這樣沒了?。?!