安卓 Volley : ImageRequest deprecated

标签 android android-volley deprecated

我使用的是 Android Studio 1.4 版。我正在使用 Android Volley 库(我使用 mcxiaoke 镜像 here )。但是 ImageRequest 已弃用。该代码仍然有效但已弃用。有没有人为此找到替代方案?

我在 Google 中搜索过这个问题,但没有找到任何解决方案。

Screenshot 1

最佳答案

我认为该类没有被弃用,但您正在使用的构造函数已被弃用。

使用这个constructor而不是这个 one

使用示例:

ImageRequest request = new ImageRequest(
                             url, myResponseListener, maxWidth,
                             maxHeight, scaleType, Config.RGB_565, myErrorListener);

关于安卓 Volley : ImageRequest deprecated,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33271864/

相关文章:

android - 使用 cordova 从 android 项目更改构建名称

facebook 应用程序 : how to put html code like 'a href' inside news feed content?(最新的 api 更新后)

c - 如何防止客户端使用低于 v1.2 的 TLS 进行连接?

android - 如果我需要以 Android API 18 为目标,并且某个方法在更高版本的 API 中被弃用,该如何进行?

java - 从 Socket.IO 获取和保存 JSON 数组

android - Gradle找不到org.gradle.configureondemand

android - 使用 AsyncTask 在 UI 上显示的倒数计时器

android - 使用 Volley 处理 JSONRequest 中的空响应

java - Android Searchview过滤recyclerview volley实现

android - 如何发送包含空格的 JSON 查询?