将即时应用程序上传到Google Play控制台失败,并显示通用消息 [英] Uploading instant app to Google Play Console fails with generic message

查看:116
本文介绍了将即时应用程序上传到Google Play控制台失败,并显示通用消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在努力将重构的应用程序升级到Google Play控制台中的预发布频道.尝试上传zip文件时,出现错误上传失败.我们无法保存您的更改.请重试."我已经为此工作了很多天,觉得我已经没有足够的选择尝试了.有没有其他人体验过与即时应用程序特别相关的内容?我的应用程序具有base_feature,main_feature和detail_feature.

I'm working on getting a refactored app up to the pre-release channel in the Google Play console. When I attempt to upload the zip file I get the error "Upload failed. We could not save your changes. Please try again." I've been working on this for many days and feel like I've run out of options to try. Has anyone else experienced this specifically related to instant apps? My app has a base_feature, main_feature, and detail_feature.

我已经完成以下工作:

  • build.gradle文件的配置方式与Google的示例项目相同.
  • 我正在尝试通过将每个功能模块的minifyEnabled设置为true来使用proguard.我为每个功能配置了Proguard规则,并且在构建时没有任何警告或错误.
  • 每个基本功能APK都在4MB以下.
  • 我尝试使用隐身模式以及其他浏览器进行上传均未成功.我可以正常上传我的常规APK(也受保护).
  • 已安装的APK和即时应用程序都具有相同的版本代码/名称和相同的软件包.

我对可能导致此错误的原因不知所措.通常,控制台会输出上传失败的原因.在完整上传的APK和即时应用APK之间是否需要特别匹配?希望有一个我忽略的简单解决方案.任何帮助将不胜感激!

I am at a loss as to what could be causing this error. Typically the console outputs a reason why the upload failed. Is there anything in particular that needs to match between the full uploaded APK and the instant app APK? Hopefully there is a simple solution that I am overlooking. Any help would be very appreciated!

编辑

基础:

dependencies {
    api(...)
    api(...)
    api(...)
    api(...)

    feature project(':home')
    feature project(':detail')
    application project(':apk')
}

家:

dependencies {
    api project(':base')
    api(...)
}

详细信息:

dependencies {
    api project(':base')
    api(...)
}

即时应用:

dependencies {
    implementation project(':base')
    implementation project(':home')
    implementation project(':detail')
}

apk:

dependencies {
    implementation project(':base')
    implementation project(':home')
    implementation project(':detail')
}

推荐答案

我能够通过将我所有的外部库引用(API/实现)移至基本功能来解决我的问题.似乎每个功能都无法托管仅在该特定功能中使用的库.

I was able to solve my problem by moving ALL my external library references (API/implementation) to the base feature. It appears that each feature is not able to host libraries that are only used in that specific feature.

希望可以在控制台上进行此方面的改进,以更好地指示构建中存在的问题,还可以构建即时应用以更好地支持模块化并减小APK大小的方式.

Hopefully there can be an improvement in this area both in the console to better indicate what's wrong with a build but also with the way instant apps are built to better support modularization and reduce APK size.

这篇关于将即时应用程序上传到Google Play控制台失败,并显示通用消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆