1

我处于一个奇怪的情况,我不知道发生了什么。

代码一直在工作,直到我将我的 Android SDK 升级到 r17。

代码能够编译,但在运行时Eclipse throws ClassNotFoundException(),在 findClass 方法下,在 PathClassLoader.class

没有找到的类是"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;

(抱歉粘贴乱七八糟,实际上只是来自 logcat 的 3 行)

我的 TargetSDK 是 API10,MinSDK 是 API8。

是什么原因??

4

1 回答 1

0

是的!!r17是罪魁祸首!!我以前把那些 .jar 文件放在我的项目之外,现在我把它们移到我的项目/lib 文件夹中,问题就解决了。这是我得到解决方案的地方:Jar-file issue with ADT r17

谢谢!

于 2012-03-27T09:57:37.783 回答