HttpClient不会在AndroidStudio中导入我有一个用AndroidStudio编写的简单类:package com.mysite.myapp;import org.apache.http.client.HttpClient;public class Whatever {
public void headBangingAgainstTheWallExample () {
HttpClient client = new DefaultHttpClient();
}}由此我得到以下编译时错误:Cannot resolve symbol HttpClient不是HttpClient包括在AndroidStudioSDK中吗?即使不是,我也将它添加到我的Gradle构建中,如下所示:dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.0.0'
compile 'org.apache.httpcomponents:httpclient:4.5'}不管有没有最后的编译行,错误都是相同的。我遗漏了什么?
3 回答
- 3 回答
- 0 关注
- 476 浏览
添加回答
举报
0/150
提交
取消