My Android library requires some of the newer Apache HTTPClient jar files so that I can upload a multipart file (See related SO question)
I'm pretty sure there will be some apps out there using my library with a different version of these Apache JAR files already, resulting in a conflict.
I've seen this happen quite a few times with android-support-v4.jar
and third-party libraries. Is there any best-practice work-around, or should I implement multipart uploading from scratch?
You can repackage the apache http client so that it uses a new package name so that it does not conflict with any other versions on the classpath.
This question explains how to do it with the maven shade plugin,
This article explains how to do it with jarjar and ant.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With