I have multiple modules in my project and have added the following dependency in my project level build.gradle
file for using HTTP Client Library throughout the project:
compile "cz.msebera.android:httpclient:4.4.1.2"
I created a new module and I want to use the above mentioned library in it. So here is what I did in build.gradle
for that module:
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"
}
I have been following this post. Upon trying to sync the project I get the following error:
Error: Unable to find optional library: cz.msebera.android.httpclient
I can't figure out what went wrong here. Please help me to sort it out.