I have added this line to my build.gradle
compile group: 'org.apache.httpcomponents' , name: 'httpclient-android' , version: '4.3.5'
and I want to use MultipartEntityBuilder in my code. However Android studio doesn't add the library to my code. Can anyone help me with this?
I don't know why but (for now) httpclient can be compiled only as a jar into the libs directory in your project. HttpCore works fine when it is included from mvn like that:
I searched over and over this solution works like a charm ::
None of the others worked for me. I had to add the following dependency, as explained here
because I was targeting API 23.
I resolved problem by adding following to my build.gradle file
However this only works if you are using gradle 1.3.0-beta2 or greater, so you will have to add this to buildscript dependencies if you are on a lower version:
Working gradle dependency
Try this:
if you are using target sdk as 23 add below code in your build.gradle
additional note here: dont try using the gradle versions of those files. they are broken (28.08.15). I tried over 5 hours to get it to work. it just doesnt. not working:
another thing dont use:
its referring 21 api level.