I am trying to send a file to a server using HttpEntity
HttpEntity mpEntity = MultipartEntityBuilder.create().addBinaryBody("file", file, ContentType.create("image/jpeg"), file.getName()).build();
However in order to use this I need to import the mime libraries to my project. When in my gradle.build I add:
compile 'org.apache.httpcomponents:httpmime:4.3.4'
I am getting the following errors warnings which result in the libraries not imported:
WARNING: Dependency org.apache.httpcomponents:httpclient:4.3.4 is ignored for debug as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
Any ideas what I need to do so I can successfully import those libraries?