versionCode is the integer Play compares: each upload must be higher than the last, up to 2,100,000,000. versionName is the string users see. Capacitor 243,123 leaves them at 1 and "1.0" in android/app/build.gradle, where teams forget them until the Play Console 1 refuses an upload. BookNest derives both from package.json:
// Version from package.json: 1.2.3 -> versionName "1.2.3", versionCode 10203
def pkg = new groovy.json.JsonSlurper().parse(file('../../package.json'))
def (major, minor, patch) = pkg.version.tokenize('.').collect { it as int }
android {
defaultConfig {
versionCode major * 10000 + minor * 100 + patch
versionName pkg.version
}
}npm 2,036 version minor now raises both. Web bundles (Live Updates and CI/CD) version separately: --android-min and --android-max keep a live update off binaries it doesn't fit.
applicationId (from appId, capacitor.config.ts) is the app's permanent identity on Play; namespace only names the generated R and BuildConfig classes. Play rejects this book's com.example.booknest ("com.example" is restricted), so before a real upload set appId and applicationId to a domain you own. On iOS the version pair is MARKETING_VERSION and CURRENT_PROJECT_VERSION in the Xcode 10 target.