Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how can I download org.apache.http packages [duplicate]

Tags:

java

android

I am beginner in android application development. I was trying database connection and I get error in my code for the following packages. Please tell me where can I download these packages , how to use them?

import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.HttpClient;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;
like image 841
vahni Avatar asked Aug 31 '15 11:08

vahni


1 Answers

If you are using,

1. Android Studio :

then add this dependancy in your build.gradle at application level :

compile 'org.apache.httpcomponents:httpcore:4.4.1' 
compile 'org.apache.httpcomponents:httpclient:4.5'

2. Eclipse :

Download this library as a jar and put it in your libs folder

HttpCore : http://mvnrepository.com/artifact/org.apache.httpcomponents/httpcore/4.4.1

HttpClient : http://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient/4.5

like image 162
AndiGeeky Avatar answered Nov 04 '22 13:11

AndiGeeky