# Use Apache HTTP Client on Android SDK 23

DevFeed: [Use Apache HTTP Client on Android SDK 23](<https://devfeed.tech/articles/use-apache-http-client-on-android-sdk-23-21779.md>)

Original publisher: [Read original article](<https://enoent.fr/posts/use-apache-http-client-on-android-sdk-23/>)

Author: Marc Plano-Lesay

Published: 2015-10-01T13:46:00Z

Content type: tutorial

Language: en

Sources: [Marc Plano-Lesay](<https://devfeed.tech/sources/marc-plano-lesay.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [HTTP](<https://devfeed.tech/topics/http.md>), [SDKs](<https://devfeed.tech/topics/sdks.md>), [Gradle](<https://devfeed.tech/topics/gradle.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [apache](<https://devfeed.tech/tags/apache.md>), [build-system](<https://devfeed.tech/tags/build-system.md>), [client-library](<https://devfeed.tech/tags/client-library.md>), [deprecated](<https://devfeed.tech/tags/deprecated.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [http](<https://devfeed.tech/tags/http.md>), [sdk](<https://devfeed.tech/tags/sdk.md>)

## AI overview

This tutorial explains why applications using the Apache HTTP Client no longer build with Android SDK 23: Google removed the library's compile-time stubs, although the corresponding classes remained on Android 6 devices. It describes restoring the stubs through the Android build tools or directly using the provided JAR, while recommending migration to alternatives such as HttpURLConnection, OkHttp, or Ion.

## Source excerpt

With the Android M SDK (API 23), Google removed the Apache HTTP Client library. It was deprecated since API 22, and Google recommended to use HttpURLConnection instead since API 9. While the classes are still bundled in Android 6 ROMs, it won't be long until we see them completely go away. Some applications are still relying on this library, and need to be updated to use the SDK 23, without having time/budget/whatever required to switch from HTTP Client. While I strongly recommend you to still take time to move to something else (there are many high-level libraries, like OkHttp or Ion, or you can use HttpURLConnection to keep a low-level access), there is a way to use the Apache library while using the SDK 23.