AndroidHttpClient and HttpGet API deprecated in Android 6.0 Marshmallow (API 23)

半城伤御伤魂 提交于 2019-11-30 23:56:00

The entire Apache API was removed from SDK 23 since from SDK 22 it was already deprecated.

You can see it here: http://developer.android.com/sdk/api_diff/23/changes.html

You can use Retrofit or Volley to reimplement your network requests.

Peter Zhao

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'
}

Official reference: https://developer.android.com/about/versions/marshmallow/android-6.0-changes.html#behavior-apache-http-client

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!