3

I've seen lots of answers but most of them are out of date. I'm trying to publish my android application to Play Store using Azure DevOps pipelines.

I'm facing an issue with the version code of the APK. Getting the following error:

APK specifies a version code that has already been used

Anyone have an idea about how I can increment the version code and name that exist in AndroidManifest.xml. I think we should change it in the CI pipeline.

Here's my CD pipeline:

enter image description here

Mohamad Mousheimish
  • 1,641
  • 3
  • 16
  • 48

1 Answers1

2

For every update that you add for your exisiting app, u will have to increment its value.

To do so:

  1. Open your build.gradle (Module: app)
  2. Increase the Version Code by 1 to your exisiting version code. ( This should be a positive integer number only).
  3. Also, change your Version Name to show differentiation.
Prajwal Waingankar
  • 2,534
  • 2
  • 13
  • 20
  • So you mean each time I want to publish to play store, I need to change the version name and code manually in my android project? – Mohamad Mousheimish Apr 30 '20 at 10:37
  • Yes thats a must as it is the way how the Google Playstore differentiates your every app release from its every updates of your app. So at the end, before building the apk, u hv to increase the versioning and build apk and then release. – Prajwal Waingankar Apr 30 '20 at 10:40