android - 我在 Play 商店部署即时应用程序时收到此错误消息

标签 android apk android-instant-apps google-play-console

enter image description here

嘿伙计们,这里的任何人都可以帮助解决这个问题 我正在开发即时应用程序,当我在 Play 商店部署即时应用程序时出现此错误,我的即时应用程序 zip 大小为 4mb enter image description here

最佳答案

因为您限制 4MB:

Official docs

What does the 4MB total download limit mean?

The size of the instant app (base feature plus any included dependent feature) should be as small as possible. The smaller your app, the easier it is for the users to download. However, once the instant app is running on the user's device, you can download additional data and store it in the internal storage. There is no 4MB hard limit for storing data in the internal storage of the device.

To calculate the size, unzip the Instant App APK and examine the APK APK files. You can either use the disk size of the APK files or open the APK Analyzer and check the Raw File Size value.

For an instant app with multiple features, you must add the size of the base feature APK to a single feature APK. The total size of both these APKs must be under 4MB.

要避免这种情况,您可以:

  • 使用Proguard删除一些未使用的代码;
  • 将一些资源从您的 apk 移动到您的服务器;
  • 通过 for 压缩 apk 中的图片 示例 TinyPng (免费服务)或 pngquant (线下图书馆);

关于android - 我在 Play 商店部署即时应用程序时收到此错误消息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46728184/

相关文章:

java - 如何检查从 Google Place Search 获得的结果中是否存在 'rating' 字段?

android - 在 Android 中打开任何文件 - Phonegap

android - 如何在已获得 Google Maps API key 后更改我的包名称?

带有 Firebase 托管的 Android Instant App

android - Instant App - 数字 Assets 链接协议(protocol)

android - ClipBoardManager.OnPrimaryClipChangedListener 不工作

android - 如何向我的 android 应用程序添加一个按钮而不是像 facebook 页面一样?

android - 使用 Ionic 处理 ZipAlign(Android 构建)

java - 查找 Android 应用程序的主要 Activity

android - 侧加载即时应用程序失败 : Reading bundle timed out