• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help Cannot resolve symbol 'httpclient'

Hi All,

I am a fresher to android.
i have a problem in
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.impl.client.HttpClients;

Not supported in my android studio.

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"

// Modify
// useLibrary 'org.apache.http.legacy'

// useLibrary 'org.apache.http.legacy'

defaultConfig {
applicationId "crescent.myapplication"
// minSdkVersion 22
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

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'
compile 'com.google.android.gms:play-services-appindexing:8.1.0'
}

I am having SDK23 , this is not supported. Pls help me.
 
Back
Top Bottom