无法解析java MoPub Android HttpResponse
我正在使用mopub sdk 4.8.0。正如documentation中所说,我包括了以下库:
安卓-support-v4.jar,
安卓-support-annotations.jar,
安卓-support-v7-recyclerview.jar,
mopub-volley-1.1.0.jar
但当我构建项目时,以下错误会写入Logcat:
The type org.apache.http.HttpResponse cannot be resolved. It is indirectly referenced from required .class files RequestQueueHttpStack.java /mopub-sdk/src/com/mopub/network line 1 Cannot find the class file for org.apache.http.HttpResponse.
我需要添加哪些库
# 1 楼答案
org。阿帕奇。http已经被弃用了一段时间,自API级别23(Android 6.0)以来,它不再属于Android默认依赖项
它仍然可用,但你需要将依赖项添加到你的应用构建中。grandle像这样归档:
更多关于它的信息可以在这里找到:https://developer.android.com/about/versions/marshmallow/android-6.0-changes.html#behavior-apache-http-client