在构建gradle和commit中更改版本代码后,无法使用devops Pipeline明智地生成Android APK版本 [英] Not Generate Android APK Version wise using devops Pipeline after changes version code in build gradle and commit

查看:80
本文介绍了在构建gradle和commit中更改版本代码后,无法使用devops Pipeline明智地生成Android APK版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在应用程序构建Gradle文件中更改版本代码后,我已提交代码.我已经在Azure DevOps中运行了管道.完成管道任务并在放置文件夹上生成APK,但是当我发布APK Play商店时,又从Play商店收到一条消息已经使用了APK版本".

I have committed code after change Version Code in app Build Gradle File. I have run the pipeline in Azure DevOps. Complete the pipeline task and generate APK on drop folder but When I have published APK play store then got a message from Play store "Apk Version is already Used".

推荐答案

如果在build.gradle文件中更改versionCode不起作用.您可以尝试删除默认配置下的versionCode和versionName,并在AndroidManifest.xml中添加versionCode和versionName:请检查以下

If changing versionCode in the build.gradle file is not working. you can try removing the versionCode and versionName located under the default config, and add the versionCode and versionName in AndroidManifest.xml: Please check this thread.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="YOUR_PACKAGE_NAME"
    android:versionCode="1"
    android:versionName="1.0">

还要确保管道是根据向其提交versionCode更改的正确分支构建的.

And also make sure the pipeline builds against the right branch to which the versionCode change is committed.

如果您想自动增加版本代码,请检查

If you would like to automatically increase the version code, Please check auto Increase the version code in Android apk using Fastlane

这篇关于在构建gradle和commit中更改版本代码后,无法使用devops Pipeline明智地生成Android APK版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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