Playstore Phonegap android version code mismatch - android

I have built my app using the phonegap build service. When I first published my app I had the following versions for android
versionCode = "1"
version = "1.0.0"
They showed up properly on the playstore.
When publishing an update I updated the versions as follows
versionCode = "2"
version = "1.0.1"
But immediately after publishing the playstore dashboard shows versions as
version = 28(1.0.1)
Where is the 28 coming from?

On Phonegap Build whenever you rebuild the app, android version code auto-increases. However, you can set the build version by setting 'versionCode'
http://www.w3.org/ns/widgets"
3 xmlns:gap = "http://phonegap.com/ns/1.0"
4 id = "com.organization.appName" versionCode="2" version = "1.0.0">

Related

Error "APK specifies a version code that has already been used.." while deploying to Google Play store from Azure DevOps

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

Displaying "Requires Android" for the App in Google Play store

I have released my App to Google Play store and it shows fine. But for this App in Additional info I do not see "Requires Android" version.
I have following version restriction defined in build.gradle and users with their Android version below 5 / sdk 28 are not able to install which is right but not sure why it is not showing up in additional info?
ext {
buildToolsVersion = "30.0.2"
minSdkVersion = 28
compileSdkVersion = 30
targetSdkVersion = 30
androidXCore = "1.5.0"
}
Here is the "Requires Android info not showing for my App. This is sample image from Google Play Store
Appreciate any help / pointers to fix this.
Thank you.
-Reds

Uploading APK to google play console doesn't work

Problem
I am trying to upload my app to the google play store, but when I do I get an error saying,
Upload failed
You need to use a different version code for your APK because you already have one with version code 1.
I don't know why this is because this is the first version of my app to go onto the google store. I would love some help fixing this!
app.json
{
"expo": {
"name": "Phoenix",
"icon": "./CandidtwoImages/Phoenixlogo.png",
"version": "0.1.0",
"slug": "Phoenix",
"sdkVersion": "21.0.0",
"ios": {
"bundleIdentifier": "com.giise.phoenix"
},
"android": {
"package": "com.giise.phoenix"
}
}
}
I had the same issue, and none of these solved it.
The solution:
In app.json
"expo": {
expo stuff
},
"android": {
"versionCode": 2
},
put in versionCode and update to 2. It must be an integer (notice not in quotes)
You need to increase versionCode in build.gradle :
defaultConfig {
minSdkVersion 23
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
versionCode - internal version number used to identified version on Google Play
versionName - version number shown to users
Details here : https://developer.android.com/studio/publish/versioning.html
This happen because the frist time you upload an APK, it will automatically set as version 1, (in android studio also set version 1 - you can see at build.gradle). So you have to change version in build.gradle frist than generate and upload. Don't worry
To update your app on store you need to update/change your version number too.
In expo this can be done through app.json version prop.
To update your app you can use expo's update feature too if you didn't change any native data or sdkVersion etc.
Form Documentation of EXPO
For the most part, when you want to update your app, just Publish
again from exp or XDE. Your users will download the new JS the next
time they open the app. There are only a couple reasons why you might
want to rebuild and resubmit the native binaries:
If you want to change native metadata like the app’s name or icon
If you upgrade to a newer sdkVersion of your app (which requires new native code)
To keep track of this, you can also update the binary’s versionCode
and buildNumber. It is a good idea to glance through the app.json
documentation to get an idea of all the properties you can change,
e.g. the icons, deep linking url scheme, handset/tablet support, and a
lot more.
Change the AndroidManifest file with the new version code.
<manifest
android:versionCode="1.1"
android:versionName="1.1">

Android Gradle 'versionCode' not read from environment variable

I have an Android that I deploy to a Google Play alpha track trough a CI server. For the Android versionCode I make use of the CI build number that I inject into the Gradle script through an environment variable.
This used to work fine; but currently Google Play is not accepting any builds. When I manually trigger a alpha upload build (using the gradle-play-publisher plugin) for Gradle I eventually end up with the following error:
APK has an invalid version code.
So when looking (using aapt dump badging apk-path) at the generated APK I see an empty value for the version code (versionCode='').
The relevant code from the build script:
def appVersionCode = System.getenv("BUILD_NUMBER") as Integer ?: 0
defaultConfig {
...
versionCode appVersionCode
...
}
It seems the variable is not read correctly; however it reads System.getenv("KEY_PASS") correctly to use for signing.
The variable is also set:
❯ echo $BUILD_NUMBER
1234
Does anyone have an idea why this specific variable doesn't seem to be read (anymore)?
Gradle version: 3.5 with Android Gradle plugin 2.3.1.
Try to change your code to this:
def appVersionCode = Integer.valueOf(System.env.BUILD_NUMBER ?: 0)
defaultConfig {
...
versionCode appVersionCode
...
}

Your APK's version code should be higher than 378

I have created an Android app in Phonegap Build few months ago and its working fine and available on Play Store .I have Published Couple of updates of my app and thay are all Published Successfully but today i want to publish new update of my app but its showing the error "Your APK Version code should be higher than 378 "
I have changed Version in config file and also changed the android:version code and version name in AndroidManifest file but nothing working for me .
Any help would be Appreciated .Thanks
I think I have the same problem as you.
In production, i have The Following release:
200118 (2.0.11)
Note that the 6-digit versionCode
I have updated Cordova Client (Cordova Android 5.2.1 and cordova#6.3.0)
I want to publish new release (my config.xml for the new version):
Widget id = "com.xxxxx.yyyyyyyyyyy" version = "2.1.1"
When I compile the release with Cordova, I get a manifest:
Manifest android: hardwareAccelerated = "true" android: versionCode =
"20101" android: versionName = "2.1.1"
Note that the 5-digit versionCode
When I want to publish on Google Play, so I get the same message as you: "Your APK version code shoulds be Higher Than 200118"
Cordova bug?
As a workaround, edit your config.xml, add "android-versionCode" and specify your versionCode manually:
widget id="com.xxxxx.yyyyyyyyyyy" android-versionCode="201018"
version="2.1.1"
And build
Your version in config.xml should be more than the previous one.Check my this answer link

Categories

Resources