Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android studio: unable to resolve HttpClientBuilder

I'm facing a strange issue On android studio. I'm using apache libraries for make some http request, and i need to change

org.apache.http.impl.client.DefaultHttpClient;

that is deprecated with

org.apache.http.impl.client.HttpClientBuilder;

but android studio don't find that package. How can i do?

like image 676
giozh Avatar asked Apr 23 '15 14:04

giozh


2 Answers

Add to build.gradle and sync

compile group: 'org.apache.httpcomponents' , name: 'httpclient-android' , version: '4.3.5'
like image 136
Vrashabh Irde Avatar answered Sep 20 '22 13:09

Vrashabh Irde


compile group: 'org.apache.httpcomponents' , name: 'httpclient-android' , version: '4.3.5.1'

4.3.5.1 is the latest version :)

like image 23
Shailesh Avatar answered Sep 22 '22 13:09

Shailesh