当我尝试运行“gradle build”时看到此错误
WARNING: Dependency org.apache.httpcomponents:httpclient:4.2.3 is ignored for the default configuration as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage with jarjar to change the class packages
:prepareFreeDebugDependencies
:compileFreeDebugAidl UP-TO-DATE
:generateFreeDebugBuildConfig UP-TO-DATE
:mergeFreeDebugAssets UP-TO-DATE
:compileFreeDebugRenderscript UP-TO-DATE
:mergeFreeDebugResources UP-TO-DATE
:processFreeDebugManifest UP-TO-DATE
:processFreeDebugResources UP-TO-DATE
:compileFreeDebug
/home/xrdawson/Projects/Foo/Bar/src/main/java/com/Foo/app/PixActivity.java:20: error: package org.apache.http.entity.mime does not exist
import org.apache.http.entity.mime.HttpMultipartMode;
^
我的 build.gradle 的结尾如下所示:
repositories {
mavenCentral()
}
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
compile "org.eclipse.mylyn.github:org.eclipse.egit.github.core:2.1.3"
compile "com.madgag:markdownj-core:0.4.1"
// compile "org.apache.httpcomponents:com.springsource.org.apache.httpcomponents.httpclient:4.2.1"
compile 'org.apache.httpcomponents:httpclient:4.2.3'
compile "com.google.android:support-v4:r6"
}
}
为什么编译过程忽略了HttpClient,然后编译失败?