【发布时间】:2016-04-01 10:49:45
【问题描述】:
您好,我是我的应用程序中的 android 新手,我正在与服务集成,所以当我导入所有这些 jar 文件时。它给出了一个错误:
无法解析符号 HttpGet、HttpClient、DefaultHttpClient。
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;
我的构建等级:-
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:design:23.0.1'
compile 'org.apache.httpcomponents:httpcore:4.4.1'
compile 'org.apache.httpcomponents:httpclient:4.5'
}
【问题讨论】:
标签: android httpclient