gpt4 book ai didi

java - MoPub Android HttpResponse 无法解析

转载 作者:行者123 更新时间:2023-11-30 01:05:14 24 4
gpt4 key购买 nike

我正在使用 mopub sdk 4.8.0。正如 documentation 中所说,我包含了以下库:

android-support-v4.jar,
android-support-annotations.jar,
android-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.

我需要添加哪些库?

最佳答案

org.apache.http 已被弃用一段时间,自 API 级别 23 (Android 6.0) 起,它不再是 Android 的默认依赖项。

它仍然可用,但您需要将依赖项添加到您的 Apps build.grandle 文件中,如下所示:

android {

....

useLibrary 'org.apache.http.legacy'
}

有关它的更多信息可以在这里找到:https://developer.android.com/about/versions/marshmallow/android-6.0-changes.html#behavior-apache-http-client

关于java - MoPub Android HttpResponse 无法解析,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38922524/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com