android 微信支付Demo遇到的问题,org.apache.http.legacy Library 的导入
2017-06-05 18:54
1191 查看
1、httpclient错误官方给的demo是eclipse的,就用as通过import project的方式打开了这个demo。打开之后导包org.apache.http的错误,在as中解决httpclient的办法,打开app里的build.gradle 解决方法:在android {compileSdkVersion 23buildToolsVersion "23.0.2"}后面加上 useLibrary 'org.apache.http.legacy',就没问题了。android {useLibrary 'org.apache.http.legacy'}注意放置的位置:是在android {}中有的小伙伴可能会下载失败,在这里提供一个jar包下载jar包导入项目就可以了也可以用于Eclipse的项目org.apache.http.legacy.jar2.还有一个图片资源为jpg的问题在app下面的Gradle android 下 添加下面代码即可也可以手动是修改图片
aaptOptions.cruncherEnabled = false aaptOptions.useNewCruncher = false
android {compileSdkVersion 25buildToolsVersion "25.0.2"//aaptOptions.cruncherEnabled = falseaaptOptions.useNewCruncher = falsedefaultConfig {applicationId "net.sourceforge.simcpux"minSdkVersion 4targetSdkVersion 25}buildTypes {release {minifyEnabled falseproguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'}}useLibrary 'org.apache.http.legacy'}
相关文章推荐
- Android stuido 错误:Error:Unable to find optional library: org.apache.http.legacy
- Android 6.0中"Unable to find optional library: org.apache.http.legacy"错误解决
- Eclipse Android开发遇到:"The type org.apache.http.HttpResponse cannot be resolved."问题的解决办法
- Android Studio 从svn导入项目 Warning:Unable to find optional library: org.apache.http.legacy
- 《Android学习笔记》Android Studio导入org.apache.http.legacy.jar教程/导入API教程
- Android 6.0中"Unable to find optional library: org.apache.http.legacy"错误解决
- Android 6.0中"Unable to find optional library: org.apache.http.legacy"错误解决
- Android 项目报错 Error:Unable to find optional library: org.apache.http.legacy
- android studio学习----Warning:Unable to find optional library: org.apache.http.legacy
- 解决新版Android studio导入微信支付和支付宝官方Demo的问题
- Android Studio解决org.apache.http.legacy找不到的问题
- Unable to find optional library - org.apache.http.legacy
- android studio没有org.apache.http.client.HttpClient;等包问题 解决方案
- Error:Unable to find optional library: org.apache.http.legacy
- Unable to find optional library: org.apache.http.legacy
- Android程序报错程序包org.apache.http不存在问题的解决方法
- android开发问题-关于Xutils框架出现无法访问HttpRequestBase 找不到org.apache.http.client.methods.HttpRequestBase解决方案
- Android Studio 更新 Android 6.0 之后无法找到 org.apache.http 包的问题
- Android Network --------------关于Android自带的org.apache.http和apache官方的(第三方的)HttpClient的问题
- Error:Unable to find optional library: org.apache.http.legacy