Version code is changed automatically in build - android

When I generate play store apk then version code is changed automatically. Here is how I define version in flavouring. How can I fix it? Any help is highly appriciated.
core {
dimension DIMENSION_APP_TYPE
applicationId "com.xyz"
versionCode 17
versionName "1.1.6"
}
26323252

Related

versionName of re-uploading app after previous version was rejected

Our app had been rejected because of All File Access Permission and now we modified app compliant with google policy. We are going to upload updated version. Our app version 5.0.1 was rejected and versionCode was 51. But now I want to keep same version 5.0.1 and increase versionCode by one i.e. 52. Can I still use same versionName and increase versionCode by 1?
Yes. As #DarShan said, versionName in your build.gradle is just a label, you can arbitrarily name it. Such a restriction you mind is for versionCode. The versionCode you must set it larger number than the previous version.
defaultConfig {
minSdk 31
targetSdk 31
versionCode 1 // integer value
versionName 'Version.2021-10-28' // just a String value
}

New release upload fail

so I'm trying to create a new release but I keep getting this error:
"You need to use a different version code for your APK or Android App Bundle because you already have one with version code 1."
Someone said to add android:versionCode="2" in android manifest, but I still get the same error. My previous release did not have a version code. I'm wondering if perhaps it's an issue with the version code increment since I don't really know what the versionCode defaults to when it is not specified.
Please help. Thank you!
You have to set the versionCode and optionally the versioName.
defaultConfig {
...
versionCode 2
versionName "1.1"
}
Note versionCode is a number.
Check this link for more details: https://developer.android.com/studio/publish/versioning#appversioning

The application I installed on Google Play does not work on android 5 version and android 6 version. What would be the reason?

The application I installed on Google Play does not work on android 5 version and android 6 version. What would be the reason ?"The application is closed." error is displayed on the screen. Application Google Play Store Link : link
Gradle Code:
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.frtparlak.EnglishWordTest"
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
( A guess since no stacktrace is attached )
While you define 'minSDKVersion 16' you are still allowed to use code in your application incompatible with e.G. sdk 16.
Your compiler warns you but if you ignore these warnings and dont handle them your app will crash on some devices.
To fix it you can use the linter or just review your warnings and or your crash report.

Google Play console Signed apk version code error

I uploaded apk with next Version code only
For example my previous version code is 23 now i uploaded apk with version code 24.But Google play console showing "You uploaded an APK or Android App Bundle with an invalid version code, a version code must be specified and should be a positive integer"
I did not get any solution
Go in the build.gradle and set the version code and name inside the defaultConfig element
defaultConfig {
minSdkVersion 9
targetSdkVersion 19
versionCode 1
versionName "1.0"
}

React native android build version code not updating

I have edited the versionCode in both the android\app\build.gradle file :
versionCode 2
versionName "2.0"
and I have updated the AndroidManifest.xml file
package="com.reactnativeapp"
android:versionCode="2"
android:versionName="2.0"
BUT I still get this error when I try to release an update to my app on google play store!
You need to use a different version code for your APK or Android App Bundle
because you already have one with version code 1.
I have tried running
gradlew clean
in the android folder and rebuilding the project and nothing has worked. Does anyone have any ideas?
Make sure that you have your versionCode and versionName set inside defaultConfig like this:
android {
...
defaultConfig {
versionCode = 2
versionName = "2.0"
}
...
}
You might have it set up for a debug-only config, which wouldn't change for release builds.

Categories

Resources