Sunday, 20 December 2015

Cannot resolve symbol HttpGet,HttpClient,HttpResponce in Android Studio API 23

Android 6.0 release removes support for the Apache HTTP client. 

If you need sdk 23, add this to your gradle:
 
To continue using the Apache HTTP APIs, you must first declare the following compile-time dependency in your build.gradle

android {
    useLibrary 'org.apache.http.legacy'
}

 Finally 

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])

testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:design:23.0.1'
compile 'org.apache.httpcomponents:httpcore:4.4.1'
compile 'org.apache.httpcomponents:httpclient:4.5'
}




I hope it will helps you .