困扰了一个晚上, 这个问题太烦了!
做一个android xmpp项目。 用了asmack包
同样的代码,同样的build path, 在我机子上就是不能运行,在小侠机子就可以!
一开始提示“ Android java.lang.VerifyError exception ”, 但没提示在哪出错。
只知道是调用asmck包里的方法时出错了!
继续追踪, 提示
Could not find class ‘org.jivesoftware.smack.ConnectionConfiguration’
我就泪崩了! 明明导入了asmack的包呀。 删除项目,重新导入项目, 重新导入包, 重启!!
甚至换了一下打开电脑的姿势! 我怕是姿势不对啊亲!!!
最终还是google帮了我。
在这里我看到了一线生机:
http:///questions/9855398/dalvikvm-cant-find-imported-class-org-jivesoftware-smack-connectionconfiguratio
评论里有人说道:
“possible duplicate of Libraries in SDK 17 – android,”
我擦咧, 我不就才刚升级了ADT嘛! 继续看:
http:///questions/9846586/libraries-in-sdk-17-android 里面写到:
If you have ClassDefNotFoundError after updating to r17, make sure to read the following links:
http://android./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.
我擦。。。就是这个惹的货! 一晚上的时间就这样没了!!!
|