我有以下声明:
PoolingHttpClientConnectionManager manager;
Android Studio 返回错误:
错误:(113, 9) 错误:找不到符号类 PoolingHttpClientConnectionManager。
我还导入了: org.apache.http.impl.conn.PoolingHttpClientConnectionManager 如 http://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/impl/conn/PoolingHttpClientConnectionManager.html但 Android Studio 没有检测到它。
我能做错什么吗?
谢谢
最佳答案
我找到了解决方案。
我需要使用 apache 存储库中的 apache 库
我需要添加:
compile group: 'org.apache.httpcomponents' , name: 'httpclient-android' , version: '4.3.5'
到我的build.grade,如https://hc.apache.org/httpcomponents-client-4.3.x/android-port.html中所述
关于java - 找不到符号类 PoolingHttpClientConnectionManager,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25876634/