6

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?

2 Answers 2

10

Add to build.gradle and sync

compile group: 'org.apache.httpcomponents' , name: 'httpclient-android' , version: '4.3.5' 
Sign up to request clarification or add additional context in comments.

Comments

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

4.3.5.1 is the latest version :)

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.