First sorry for my bad English I am new to android studio 1.4 ,I am getting error in HttpClient
Error
C:\Users\madhu\AndroidStudioProjects\LoginAndsign\app\src\main\java\com\login\loginandsign\SimpleHttpClient.java
Error:(27, 20) error: cannot find symbol class HttpClient
Error:(34, 20) error: cannot find symbol class HttpClient
Error:(36, 31) error: cannot find symbol class DefaultHttpClient
Error:(40, 13) error: cannot find symbol variable ConnManagerParams
Error:(57, 13) error: cannot find symbol class HttpClient
Error:(58, 13) error: cannot find symbol class HttpPost
Error:(58, 36) error: cannot find symbol class HttpPost
Error:(59, 13) error: cannot find symbol class UrlEncodedFormEntity
Error:(59, 51) error: cannot find symbol class UrlEncodedFormEntity
Error:(96, 13) error: cannot find symbol class HttpClient
Error:(97, 13) error: cannot find symbol class HttpGet
Error:(97, 35) error: cannot find symbol class HttpGet
I added below dependency but still it showing same error
dependencies {
compile 'com.google.android.gms:play-services:+'
compile 'org.apache.httpcomponents:httpclient:4.2.6'
compile 'org.apache.httpcomponents:httpmime:4.2.6'
compile files('libs/core.jar')
}
You need to initialize useLibrary 'org.apache.http.legacy'
Please check HttpClient won't import in Android Studio
android {
compileSdkVersion 23
buildToolsVersion '23.0.1'
defaultConfig {
minSdkVersion // set yours
targetSdkVersion 23
versionCode 11 //Yours
versionName "0.1" // Yours
}
dependencies {
compile 'com.google.android.gms:play-services:7.8.0'
compile 'org.apache.httpcomponents:httpmime:4.2.6'
compile 'org.apache.httpcomponents:httpclient:4.5'
compile files('libs/core.jar')
}
Then Clean-Rebuild-Restart-Sync Your Project .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With