dcloudio / dcloudio/uni-app

Android Google Play warning: manual network bitmap download/decode reported from DCloud runtime stack

Open
#6,064 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
41.6k
Forks
3.7k
Avg merge
7h 6m
Merged PRs (30d)
6

Description

**问题描述**

Google Play Console 报出 “通过位图图片优化来提升应用性能” 警告,提示应用存在手动从网络下载并解码图片的行为,可能导致内存占用过大、性能缓慢或崩溃。

但 Play Console 给出的主要堆栈位于 DCloud / uni-app Android runtime 内部,而不是业务代码中的 BitmapFactory 调用。

**复现步骤**

1. 使用 uni-app Vue3 CLI 项目构建 Android App(AAB/APK)。
2. 提交到 Google Play Console。
3. 在 Android Vitals / performance quality 相关页面查看 “通过位图图片优化来提升应用性能” 警告。

**Google Play Console 提示的相关堆栈**

- io.dcloud.feature.gg.dcloud.GGSplashView.getIcon 中解码
- kotlinx.coroutines.internal.FastServiceLoader.parse 中下载
- io.dcloud.common.util.NetTool.request 中下载
- io.dcloud.common.util.net.NetWork.run 中下载
- io.dcloud.net.DownloadNetWork.connect 中下载
- io.dcloud.net.UploadNetWork.responseUpload 中下载
- io.dcloud.p.l3.a 中下载
- kotlin.reflect.jvm.internal.impl.serialization.deserialization.builtins.BuiltInsResourceLoader.loadResource 中下载
- uts.sdk.modules.DCloudUniNetwork.SimpleCallback.onResponse 中下载

**预期结果**

希望 DCloud Android runtime / 5+ runtime 内部的网络图片下载与解码逻辑能够使用更节省内存的实现,例如支持降采样、缓存与合理的 Bitmap 内存管理,避免触发 Google Play 对 manual network bitmap download/decode 的警告。

**实际结果**

Google Play Console 将上述 DCloud / uni-app runtime 栈标记为手动网络下载并解码图片。

**系统信息:**

- 发行平台: 5+ App / Android
- 操作系统: Android
- targetSdkVersion: 36
- uni-app 类型: Vue3 CLI 项目
- @dcloudio/* 版本: 3.0.0-5020420260813003
- 当前查看到的后续版本: 3.0.0-alpha-5020520260829001 / v_5.25-alpha-vue3

**补充信息**

业务代码侧已尽量避免手动下载远程图片后再展示:

- 图片展示统一走 uni-app 组件封装
- 列表缩略图优先使用 thumb URL
- 本地图片上传使用 multipart 文件直传,避免 App 端转 base64
- 移除了未使用的 uni.downloadFile 图片下载封装

但 Google Play Console 仍然指向 io.dcloud.* 运行时内部堆栈。

请问这些堆栈是否来自 DCloud Android runtime / 5+ runtime 内部实现?是否已有版本修复或计划修复 Google Play 对 “manual network bitmap download/decode” 的检测问题,尤其是:

- io.dcloud.feature.gg.dcloud.GGSplashView.getIcon
- io.dcloud.common.util.NetTool.request
- io.dcloud.net.DownloadNetWork.connect
- uts.sdk.modules.DCloudUniNetwork.SimpleCallback.onResponse

如果需要更完整的 Play Console trace 或最小复现工程,我们可以继续补充。

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the warning with the stated uni-app Vue3 CLI Android build and collect the complete Google Play trace. Trace the listed runtime entry points, including GGSplashView.getIcon, NetTool.request, DownloadNetWork.connect, and SimpleCallback.onResponse, to determine which component performs the bitmap work. Done means identifying the responsible runtime code and confirming a released or tested fix for the warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, javascript, kotlin
Domain
mobile, performance
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.