Header 类型已弃用 AsyncHttpResponseHandler()

The type Header is deprecated AsyncHttpResponseHandler()

我在所有项目中都使用 AsyncHttpClient。但最近我看到 Header[] 类型已被弃用。是不是我再也无法获得 Header[] 作为回应?

有没有我可以使用的可选方法?

我正在使用android-async-http-1.4.6版本

我们将不胜感激。

要使其在 1.4.9(不确定早期版本)版本中工作,只需将 apache 的 Header 导入替换为 cz.msebera.android.httpclient.Header

同样适用于 StringEntity(替换为 cz.msebera.android.httpclient.entity.StringEntity

只需将库更新到 1.4.9

compile 'com.loopj.android:android-async-http:1.4.9'