I went through the docs did not see anywhere mentioning on this,
If i release my app for alpha testing or a beta release with version Code 1, name 1.0 does this affect the production release which needs to be Code 1, Name 1.0.
Does the version system get carried over or will production release will have its own version flow.
Thank you.
When you upload an apk, you must use unique VersionCode (integer value) and show to the user the VersionName (string value). The PlayStore will not allow you to upload apk with already used VersionCode
Related
I'm trying to deploy our Nativescript app to the Google Play Store using a YML pipeline in Azure DevOps. There is a deployment task that automatically increases the versionCode and versionNumber, which always used to work fine.
However now that we upload, I get this error:
##[error]Error: Failed to upload the bundle /Users/runner/work/1/_Android/app-release.aab. Failed with message:
Error: APK specifies a version code that has already been used..
I see that the latest version in Google Play store is 1.0.3601
In the release pipeline I see that the versionCode generated is 1.0.3603 and versionName is 1.0.3604
How can this be solved? What am I doing wrong?
As suggested by User Kingston Fortune - Stack Overflow, make sure to change versionCode and versionName in build.gradle file:
defaultConfig {
applicationId "com.my.packageId"
minSdkVersion 16
targetSdkVersion 27
versionCode 2 <-- increment this by 1
versionName "2.0" <-- this is the version that shows up in playstore,
remember that the versioning scheme goes as follows.
first digit = major breaking changes version
second digit = minor changes version
third digit = minor patches and bug fixes.
e.g versionName "2.0.1"
}
References: Upload failed You need to use a different version code for your APK because you already have one with version code 2 , Problem with build version when publishing APK to Play Store , https://github.com/bitrise-steplib/steps-google-play-deploy/issues/31 and https://developer.android.com/studio/publish/versioning#appversioning
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
I have uploaded a new alpha version of my Android app in the developer console, which provides a new database version. Now I also have to update the productive release, because of an error - but do not want to include the other stuff of the alpha version into it yet (espacially the database changes).
But if I update the productive track, it normaly replaces the alpha version and this will make the testing version no more available for the testers. Is there any way to release an productive version and keep the alpha one? Or is the only way to relase a new alpha version after the production version and hope that it will be earlier available for the testers than the productive one?
It is possible but requires to assign the new production versionCode to be both higher than the current production versionCode and lower than the alpha versionCode.
Example:
Prod versionCode: 100
Alpha versionCode: 105
=> Use 101 for the new prod versionCode.
If you used consecutive numbers between the production track and the alpha track, then you'll first need to upload a new version on the alpha track with a versionCode a few numbers higher to leave enough room to then assign a lower versionCode for your next version on the production track.
Example:
Prod versionCode: 100
Alpha versionCode: 101
=> Publish new APK on alpha track with versionCode 103, then publish new APK on prod track with versionCode 102.
I've searched through stackoverflow and this doesn't seem to be a duplicate question, so please notify me if it has already been asked. I've made a second version of an app and I was wondering if there was a naming convention for the app versions. In my gradle, I've changed the values of versionCode and versionName to
versionCode 2
versionName "1.0.2"
Is this the right convention? Is there even a convention? Does versionCode have to be an integer? Is 1.02 or 1.0.02 acceptable? And does it have to be by increments of 1(i.e. can I jump straight to 1.7 on the second update)?(sorry for all the questions, I wanted to get all of it at once.)
versionCode have to be integer, and it is used for android to keep track of which apk is latest, e.g. in Google Play, you can upload your apk if your new apk has versionCode larger than that of the apk you previously uploaded.
versionName is for display only, and communication with user, it is up to you to define it. I.e. no restriction
There are no literal restrictions on either, just their data types:
versionCode can be any integer and versionName can be any string.
However, Android uses the versionCode to tell which builds are more recent - and doesn't let users install an apk if the versionCode of the apk to install is less than the versionCode of the apk already installed.
Therefore version code changes should always be to larger numbers - though the how much larger is technically irrelevant.
versionName is for display purposes only. It could be set to "v1.43 - blueVersion attempt4".
A common naming conversion is to label each release version major.minor.fix in the version name, and then reflect it in the version code. e.g. v "2.3.11" becomes version code 20311. which could be followed by v"3.0.0" = code 30000.
What is meant by bundle ID in android, What is its usage, And can two android apps have same bundle ID? if YES then why? and if NO then why
A bundle ID otherwise known as a package in Android is the unique identifier for all Android apps. It needs to be unique as when you upload it to Google Play it identifies and publishes your app using the package name as the unique app identification.
Really it is the only thing which is necessary to identify your app, and generally it has 3 parts:
com.example.testapp
Where example is generally the company/publishers name, and testapp is the appname.
You will not be able to upload an APK to the store which has the same package as another app already in the store.
Should you ever need to change the package name in Eclipse, do the following:
Right click project > Android Tools > Rename Application Package...
BundleID is a Unique Identifier for Identifying your app on Google Play Store. You can Note that for each apps on Google Play something like this:
https://play.google.com/store/apps/details?id = com.yourdomain.appname
You cannot assign the same BundleId for more than one App. This is because the Google Play uses your BundleID as Unique Identifier for your app.
So, you can configure your BundleID in Android Studio by editing your applicationId property in app level gradle as shown below:
android {
compileSdkVersion 27
defaultConfig {
//Edit the applicationId for changing your BundeID.
applicationId "com.yourdomainname.yourappname"
minSdkVersion 15
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}