New App, still pipeline error. Bad apk version

Hello again.

I must be stupid :crazy_face:or something. My pipeline still fail with this error:
ERROR: Could not build app net.foucry.pilldroid: Unexpected version/version code in output; APK: 'v0.100-beta' / '100', Expected: 'v0.101-beta' / '100'

in the .yml file I have put :

  - versionName: v0.101-beta
    versionCode: 100
    commit: v0.101-beta
    subdir: app


AutoUpdateMode: Version
UpdateCheckMode: Tags
CurrentVersion: v0.101-beta
CurrentVersionCode: 100

In my build.gradle:

 versionCode 100
 versionName "v0.101-beta"

In github I have 2 tags v0.100-bata and v0.101-beta.

Did I need to remove the of tag v0.100-beta in github? Sound illogical.

Thanks for helping me, I am turn crazy.

I think that message is telling you the versionName and versionCode appear to be mismatched. I took a look at your tags, to compare version 100 to 101, and it looks like you forgot to increment the versionCode. It should be incremented with every release (needs to be unique).

Hum… I did not understood that reading the docs. SO I need to update versionCode form 100 to 101 into build.gradle.
Look strange because the codebase did not change. The only change is versionName.

I give a try to your suggestion, right now.

Thanks for your time.

Its mentioned briefly here:

Anyhow, if you are tagging v0.101-beta, its expected that your build.gradle contains the same versionName. I think the specific value you assign to versionCode is less important (it doesn’t have to be 101), but it must not collide with any previous versions (the expectation is that it increases monotonically).

The versionName in the build.gradle is v0.100-beta but in yml it is v0.101-beta. This is the mismatch.

Thanks ! More clear now…
But… I was exhausted so I destroy tags, and releases on github side, downgrade versionsCode to 100 and versionName to v0.100-beta and recreate a tag ǜ0.100-beta`on github.

Suddenly, it work.

In conclusion, If I understood, versionName in build.gradle and github tag MUST be synchronised. Is it true?

Thanks all for your time and your advises. May be my experience could help to improve doc. I´m volunteer for that part.

I think since checkupdates uses the name of the tag to write the metadata, if the tag doesn’t match build.gradle, then the versionName that ends up in the metadata won’t either. (that’s assuming the offending entry was written automatically… we can create bad entries by hand too)

Later when the app is built, the apk is versioned from build.gradle but its a mismatch from the metadata; Unexpected version/version code in output; APK: 'v0.100-beta' / '100', Expected: 'v0.101-beta' / '100' is making more sense to me now. The versionCode is also the same for both tags, but that’s a separate issue (not what the message is actually complaining about).

The tag name is not important. But the version name in the build.gradle must be the same as the one in the metadata. With AutoUpdataMode: Version the tag with the highest version code will be picked no matter what the tag name is.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.