我处于一个奇怪的境地,我不知道发生了什么。
代码运行正常,直到我把我的Android SDK升级到r17。
代码能够编译,但在运行时,可以在PathClassLoader.class中的findClass方法下编译Eclipse throws ClassNotFoundException()
未找到的类是"org.apache.http.entity.mime.content.ContentBody" and "org.apache.http.entity.mime.content.StringBody"
我已经导入了最新的(4.1.3) http components jar file into project-> properties-> java build path-> add external jar,
并且还清除了我的项目N次,但似乎没有任何工作。
这是来自logcat的:
03-27 17:31:32.461: W/dalvikvm(14263): VFY: unable to find class referenced in signature (Lorg/apache/http/entity/mime/content/ContentBody;)
03-27 17:31:33.802: E/dalvikvm(14263): Could not find class 'org.apache.http.entity.mime.content.StringBody', referenced from method com.milotin.core.base.MTBaseNetworkUtilities.getContentBody
03-27 17:31:33.802: W/dalvikvm(14263): VFY: unable to resolve new-instance 710 (Lorg/apache/http/entity/mime/content/StringBody;) in Lcom/milotin/core/base/MTBaseNetworkUtilities;(很抱歉粘贴得很乱,实际上只有3行来自logcat)
我的TargetSDK是API10,MinSDK是API8。
原因是什么??
发布于 2012-03-27 17:57:38
是的!!r17是罪魁祸首!!我过去常常把这些.jar文件放在我的项目之外,现在我把它们移到我的项目/库文件夹中,这样问题就解决了。这就是我的解决方案:Jar-file issue with ADT r17
谢谢!
https://stackoverflow.com/questions/9886928
复制相似问题