【发布时间】:2018-01-07 19:42:09
【问题描述】:
我的项目中有多个模块,并在我的项目级别 build.gradle 文件中添加了以下依赖项,以便在整个项目中使用 HTTP 客户端库:
compile "cz.msebera.android:httpclient:4.4.1.2"
我创建了一个新模块,我想在其中使用上面提到的库。所以这是我在build.gradle 中为该模块所做的:
android {
compileSdkVersion 25
buildToolsVersion "26.0.0"
useLibrary 'cz.msebera.android.httpclient'
defaultConfig {
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
我一直在关注this post。在尝试同步项目时,我收到以下错误:
错误:找不到可选库:cz.msebera.android.httpclient
我无法弄清楚这里出了什么问题。请帮我解决一下。
【问题讨论】:
标签: android httpclient