android 6.0 使用HttpClient
来源:互联网 发布:paul van dyk知乎 编辑:程序博客网 时间:2024/06/05 08:09
最近将google推出了android 6.0之后将android studio的api,sdk等都升级到了6.0(api.23)然后问题来了,发现自己程序中的很多用到http的东西都出现错误,最后发现原因是android 6.0不提供org.apache.http.*。这让我很忧伤,自己的工程中用到了Xutils,一下子整个工程都死掉了。
好了,不废话了,解决办法:
在build.gradle中加入:useLibrary'org.apache.http.legacy'
如下:
apply plugin: 'com.android.application'android { compileSdkVersion 23 buildToolsVersion '23.0.1' defaultConfig { applicationId "" minSdkVersion 14 targetSdkVersion 23 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } useLibrary 'org.apache.http.legacy'}dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') compile 'com.android.support:appcompat-v7:23.+' compile files('libs/xUtils-2.6.14.jar')}
1 0
- android 6.0 使用HttpClient
- Android 6.0 使用 HttpClient
- Android 6.0 使用 Apache HttpClient
- Android 6.0 使用 Apache HttpClient
- Android 6.0 使用 Apache HttpClient
- Android 6.0 使用 Apache HttpClient
- Android 6.0 使用 Apache HttpClient
- Android 6.0 使用 Apache HttpClient
- Android 6.0 使用 Apache HttpClient
- Android 6.0 使用HttpClient的问题
- 在Android 6.0下继续使用HttpClient
- android 6.0使用httpUrlConnection代替httpClient
- 在Android 6.0 中使用HttpClient
- android httpclient使用
- android HttpClient 的使用
- android下使用httpclient
- android HttpClient 的使用
- Android 使用HttpClient代理
- 从MVC到前后端分离
- html响应式布局教程
- 中国媒体
- IOS获取崩溃日志信息
- win10 自适配分栏 和 加返回按钮
- android 6.0 使用HttpClient
- js控制audio
- 动态绑定一
- Android UI学习——ListView 和Adapter
- iOS QQ第三方登录实现
- 快速排序
- android 在通话状态下,当有通知来时(如低电量提示、wifi 连接,等),没有通知音
- 苏州地铁线路查询接口 地铁线路实时详细信息
- 彻底理解强连通!!