简体   繁体   中英

Android app different version code for beta/production and alpha

The app

I've an android app in production with version 1.xx that currently is in manteinment mod (new releases are only bugfix). I'm doing a rewrite of this app that will be the 2.0 version.

The question

Is it possible to continue to make 1.xx bugfix releases (upload them in beta and then promote to production) and to upload 2.0.x versions in the alpha channel to alpha testers?

on Google play you must have to use incremental versionCode for any alpha, beta, production whenever upload new APK. you can use any versionName for your app.

you can upload 1.xx(versionName) with two different versionCode.

Is it possible to continue to make 1.xx bugfix releases (upload them in beta and then promote to production) and to upload 2.0.x versions in the alpha channel to alpha testers?

--> yes

You can setup multiple buildTypes in gradle, while generating apk you can select buildType from the dialog box so you can generate different APKs with different versionCodes

android {
    compileSdkVersion 23
    buildToolsVersion "23"   

    defaultConfig {
        applicationId "[your-app-id]"
        minSdkVersion 16
        targetSdkVersion 22
        versionCode "1.1.1"
        versionName "1.0.4"
        manifestPlaceholders = [ appName:"@string/app_name", appId: "[your-app-id]" ]
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
    buildTypes {
        alpha {
            minifyEnabled false
            shrinkResources false
            versionCode "2.x"
            applicationIdSuffix '.test'
            manifestPlaceholders = [ appName:"@string/app_name_test", appId: "[your-app-id].test" ]
        }
        .... other buildTypes
    }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM