错误“APK 指定的版本代码已被使用。”从 Azure DevOps 部署到 Google Play 商店时
我正在尝试使用 Azure DevOps 中的 YML 管道将 Nativescript 应用程序部署到 Google Play 商店。有一个部署任务会自动增加versionCode和versionNumber,以前一直工作得很好。
但是现在我们上传,我收到此错误:
##[错误]错误:无法上传包/Users/runner/work/1/_Android/app-release.aab。失败并显示消息: 错误:APK 指定的版本代码已被使用。
我看到 Google Play 商店中的最新版本是 1.0.3601
在发布管道中,我看到生成的 versionCode是 1.0.3603,版本名称是 1.0.3604
如何解决这个问题?我做错了什么?
I'm trying to deploy our Nativescript app to the Google Play Store using a YML pipeline in Azure DevOps. There is a deployment task that automatically increases the versionCode and versionNumber, which always used to work fine.
However now that we upload, I get this error:
##[error]Error: Failed to upload the bundle /Users/runner/work/1/_Android/app-release.aab. Failed with message:
Error: APK specifies a version code that has already been used..
I see that the latest version in Google Play store is 1.0.3601
In the release pipeline I see that the versionCode generated is 1.0.3603 and versionName is 1.0.3604
How can this be solved? What am I doing wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据用户 Kingston Fortune - Stack Overflow 的建议,请务必更改
versionCode
和 versionName在 build.gradle 文件中:参考文献:上传失败您需要为 APK 使用不同的版本代码,因为您已有版本代码为 2 的 APK 、 将 APK 发布到 Play 商店时构建版本出现问题 , https://github.com/bitrise-steplib/steps-google-play-deploy/issues/31 和 https://developer.android.com/studio/publish/versioning#appversioning
As suggested by User Kingston Fortune - Stack Overflow, make sure to change
versionCode
and versionName in build.gradle file:References: Upload failed You need to use a different version code for your APK because you already have one with version code 2 , Problem with build version when publishing APK to Play Store , https://github.com/bitrise-steplib/steps-google-play-deploy/issues/31 and https://developer.android.com/studio/publish/versioning#appversioning