首页 > 移动平台 > 详细

Android:android sdk源码中怎么没有httpclient的源码了

时间:2016-06-12 03:00:45      阅读:183      评论:0      收藏:0      [点我收藏+]

今天想使用这个API,怎么也找不到。废了好多时间。。。

查阅资料才知道如下解释:

android 6.0(API 23)中,Google已经移除了移除了Apache HttpClient相关的类
推荐使用HttpUrlConnection,如果要继续使用需要Apache HttpClient,需要在eclipse下libs里添加org.apache.http.legacy.jar,android studio里在相应的module下的build.gradle中加入:
android {
useLibrary ‘org.apache.http.legacy‘
}
上面的jar包在:**\android-sdk-windows\platforms\android-23\optional下(需要下载android 6.0的SDK)
同时也移除了SSL 和Notification的setLatestEventInfo方法

再看我的API就是23,找不到这个API很正常了。。。

毕竟这个API的POST很麻烦,其实掌握HttpConnection就足够了。

Android:android sdk源码中怎么没有httpclient的源码了

原文:http://blog.csdn.net/qq_32059827/article/details/51606299

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!