在内部测试通道中,versionCode必须大于其他通道中的任何一个版本。可以按照以下步骤执行:
示例代码:
android {
defaultConfig {
applicationId "com.example.myapp"
minSdkVersion 16
targetSdkVersion 30
versionCode 5 // Version code for internal test track
versionName "1.0.4"
}
// Other track configurations
flavorDimensions "version"
productFlavors {
development {
dimension "version"
applicationIdSuffix ".dev"
versionCode 2 // Version code for development track
versionNameSuffix "-dev"
}
production {
dimension "version"
versionCode 4 // Version code for production track
versionNameSuffix ""
}
}
}