Release apk with different version code

Hi! I’m having a problem using the “Step google play deploy”. When the CI is triggered, two apks are generated, a debug and a release type. The problem is that when I update the version code in my Gradle defaultConfig options, the debug apk version code is updated and the release apk it’s with the old version code so this way I’m unable to upload the apk because the version code is the same as the one in the Google play developer console.

I already fixed it. The problem was because the play store .jks key was not the original one

1 Like

Thanks for reporting @Dan22 , I marked it as the solution! :slight_smile:

@viktorbenei , I’m sorry to tell you that I’m still having the same problem. Even when using the right play store key, the release apk version code is not being updated, the debug apk version code is updating fine, but not the release apk. Do you have any tip or solution for this case?

Now I notest that in the Gradle Runner step inside the Config section, the default gradle task to run was “assembleDebug” and now I changed it to “assembleRelease”. I’ll try and I’ll let you know. :+1:

1 Like

Did it work after the change @Dan22?

Yes, it worked. This way the release apk version code is updated correctly. Now, besides that I had to change the “Deploy to directory or file path” for $BITRISE_APK_PATH in the config section of the Deploy to Bitrise step and the APK file path in the Step google play deploy for $BITRISE_APK_PATH

1 Like

Glad to hear it worked, and thanks for reporting the solution @Dan22! :slight_smile:

Happy Building! :slight_smile: