![](/img/trans.png)
[英]java.lang.NoSuchMethodError: No virtual method getTextBounds Error in android
[英]Android java.lang.NoSuchMethodError: No virtual method
我想发送发布请求,以通过Google表单将数据发送到我的工作表
我使用Android Studio,在我的android项目中,当我尝试执行DefaultHttpClient
对象时出现错误:
---------崩溃开始10-26 16:19:08.749 21824-22874 / mypackage E / AndroidRuntime:致命异常:线程1553进程:mypackage,PID:21824 java.lang.NoSuchMethodError:无虚拟方法执行(Lorg / apache / http / client / methods / HttpUriRequest; Lorg / apache / http / protocol / HttpContext;)Lorg / apache / http / client / methods / CloseableHttpResponse; 在Lorg / apache / http / impl / client / DefaultHttpClient类中; 或其上级类(在/system/framework/org.apache.http.legacy.boot.jar中显示“ org.apache.http.impl.client.DefaultHttpClient”的声明)
错误报告给该行: response = httpClient.execute(httpPost,localContext);
我使用httpclient-4.5.1.jar库
minSDK:API 15:Android 4.0.3(IceCreamSandwich)
我不知道该如何解决! 请帮我!
在build.gradle android部分中将此代码
useLibrary'org.apache.http.legacy'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.