After Android 6.0 releases, Support for the Apache HTTP client is removed. If our app is using this client and targets Android 2.3 (API level 9) or
useLibrary
adds the library to classpath while compiling but does not bundle the library with the application.
compile
dependencies are in classpath at compile time and additionally they get shipped with your APK.
For the Apache HttpClient support, use useLibrary
when compiling with SDK 23+. The library is already there in the target platform. It is just not there in the compile SDK.