Issue:
When trying to deploy your app using the Google Play Deploy Step, it fails with the following error:
Failed to upload APKs: failed to upload app bundle, error: googleapi: Error 403: APK specifies a version code that has already been used.
Possible solutions:
This error occurs because, as the error message suggests, you're trying to deploy an app with a versionCode
that has already been used to deploy the same app. To fix this:
In your Android project's
build.gradle
file, remove the lines that set theversionCode
andversionName
located under the default config:android { ... defaultConfig { ... versionCode 1 versionName "1.0" ... } }
In the
AndroidManifest.xml
file, add those definitions:<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="YOUR_PACKAGE_NAME" android:versionCode="1" android:versionName="1.0">