Android studio 中NameValuePair跟BasicNameValuePair 不能正常导包问题

来源:互联网 发布:紫金桥软件 编辑:程序博客网 时间:2024/05/21 14:42
import org.apache.http.NameValuePair;import org.apache.http.message.BasicNameValuePair;

Cannot resolve symbol NameValuePair

最后解决方案是:

在module文件中加入了

[java] view plain copy
 在CODE上查看代码片派生到我的代码片
  1. 1)   android {  
  2.        useLibrary 'org.apache.http.legacy'  
  3.              }  
  4.   
  5. )  compile 'org.apache.httpcomponents:httpcore:4.4.1'  
  6.    compile 'org.apache.httpcomponents:httpclient:4.5'  

0 0
原创粉丝点击