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

Help Cannot resolve symbol 'httpclient'

Karupusamy

Lurker
Jan 23, 2016
3
0
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.
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones