Android ADT升级到22后的bug:Could not find class 'org.apache.commons.httpclient.methods.PostMethod'

ADT升级到22后使用apache HttpClient出现了这样的bug:

虽然已加入库commons-httpclient-3.1.jar,

Android ADT升级到22后的bug:Could not find class 'org.apache.commons.httpclient.methods.PostMethod'_第1张图片

而且编译也没有任何错误,但是运行时出出现找不到类的错误:

Could not find class 'org.apache.commons.httpclient.methods.PostMethod', referenced from method....

解决方法:

在工程上右键选择"Build Path"->"Configure Build Path"->"Order and Export"->选中"Android private Libraries"

Android ADT升级到22后的bug:Could not find class 'org.apache.commons.httpclient.methods.PostMethod'_第2张图片

你可能感兴趣的:(Android ADT升级到22后的bug:Could not find class 'org.apache.commons.httpclient.methods.PostMethod')