在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方法 也可以使用OkHttp框架
HttpClient在 AndroidStudio中使用
最新推荐文章于 2021-05-27 17:44:01 发布