Apache HTTP connection with Android 6.0 (Marshmallow) Apache HTTP connection with Android 6.0 (Marshmallow) android android

Apache HTTP connection with Android 6.0 (Marshmallow)


This page discusses the removal of the Apache HTTP classes, and it suggests a workaround as well:

To continue using the Apache HTTP APIs, you must first declare the following compile-time dependency in your build.gradle file:

   android {       useLibrary 'org.apache.http.legacy'   }

In my case Android Studio still complained that it couldn't find these classes, but the app did build and run.

The page does recommend you move to HttpURLConnection, though.