I've an android app on the market, which I've built through the online PhoneGap Build service. Now I want to upgrade it to next version, so I create a new app via PhoneGap Build.
Unfortunately, when i try to put them in the market as the app upgrade, it returns me an error, saying that there is a problem in the versionCode. I know that the versionCode in the AndroidManifest must be higher than the previous one, in order to upgrade the app successfully, so I set the version to 1.2.
Which could be the error? Is it possible that the market returns me a false error? I mean, that the error is another one?
Anyone experienced anything like this?Any advice?Thanks to all!
Check that you're updating both the android:versionCode and android:versionName attributes in the manifest.
Also, make sure that the value in versionCode is just an integer (which you increase with each new release). The symbolic version, "1.2", should go in the versionName field.
There are a couple of things that you need to check.
The package name has to be the same and signed with the same key.
Version code problems are usually due to one of two things:
a. android:versionCode is not an integer. This has to be a whole number incremented for each new version. An app can have the same versionName as long as the version Code is higher for the update. First version android:versionCode="1", upgrade versionCode="2"
b. android:versionName has been updated but the versionCode is the same. i.e android:versionName was changed from "1.5" to "1.6" but the versionCode is still set to "1".
Related
I've built an app with Phonegap/Cordova and configured its versionCode to be 16207 with attribute android-versionCode="16207" on widget tag of my Phonegap project's config.xmlfile, as you can see in the picture below.
After I run command phonegap prepare android it properly generates an Android project with the expected versionCode value of 16207, and then I build and sign the APK for submiting to the Google Play Store. Here is how the Android project's AndroidManifest.xml file looks like regarding the versionCode configuration:
The problem is, as soon as the APK is successfully uploaded to Google Play Store its versionCode is not 16207 anymore, but 162074 instead. Notice there's an "4" appended to the end of my intended configuration value for versionCode ("162074" = "16207" + "4").
I've tried to increase the versionCode value in hope that it wouldn't be changed by Google Play Store, but it always does it, and for some reason an additional "4" digit is appended to the end of whichever version code I choose for my app.
So my doubt is this: where is this additional "4" digit coming from? And how can I prevent Google Play Store from changing (e.g messing around) whith the versionCode configuration I set up for my apps? Thanks.
Edit
I got more info about the problem. It looks like it only happens when I add more than one APK file to the same app version. When there's only one APK file the versionCode doesn't change, but when I add a second APK file Google Play appends an "4" digit to the end of the versionCode, and when I add a third APK file Google Play changes it appending a "2" digit to the end of the versionCode. I saw this because my app has three APKs: one for Android API 23+, another one for Android API 16+ x86 and another one for Android API 16+ ARMV7.
To try to clarify a bit more, here is an schema of my APKs codeVersions and what Google Play does with them:
APK for Android API 23+: versionCode 232070 doesn't change.
APK for Android API 16+ x86: versionCode 16207 changes to 162074
APK for Android API 16+ ARMV7: versionCode 16207 changes to 162072
You may ask why I give the same versionCode number for the last two APKs. The reason is because I know Google Play adds these strange digits to the end of their versionCodes, so in the end they won't have the same versionCode and thus this will not be a problem.
But still I would like to at least understand how and why Google Play changes the APKs versionCode instead of just using the values I give them in the config files.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed last year.
The community reviewed whether to reopen this question last year and left it closed:
Original close reason(s) were not resolved
Improve this question
I am trying to release a new version of my Android App.
I can upload the APK file but after I click the "Review" Button I am getting below error.
Review summary
Errors
Resolve these errors before starting the rollout of this release.
You can't rollout this release because it doesn't allow any existing users to upgrade to the newly added APKs.
Please note that this app was developed using CORDOVA
The app version details are as below image. The only difference from the previous and this new version is the Target SDK is changed from 24 to 26
Can someone please give some idea to fix this issue. Thanks for your help
I contacted the Google support and they replied within 24 hours.
The issue is the android:versionCode in the AndroidManifest.xml is lower than my previous release. After I fixed the issue I was able to release my app without any issue.
How I fixed the issue
I changed the android-versionCode to a higher value in <manifest tag in the config.xml file so AndroidManifest.xml has the higher value.
Full reply from Google
Hi,
Thanks for contacting Google Play Developer Support.
You're seeing that error message because your new APK has a lower version code than the previous APK. Newer APKs must always have a higher version code than the previous version, or the Play Store won't know that the new APK is an update. Please change your new APK's version code to be at least 206020.
Regards,
Google Play Developer Support
If your Old APK version is a higher number than your New APK version then you get this error.
It is not the version name that matters, that can actually be any string, it is only the version code which must always be higher than a previous version.
https://developer.android.com/studio/publish/versioning
To fix for Flutter
In pubspec.yaml it is the version line, and the number after the + sign is the one that must be higher than the Old Version Code shown in the Google Play Console screen as the "1 app bundle deactivated".
That would be 50 if this was your version line :
version: 1.0.0+50
I faced same issue, interestingly the versioncode(120001) of new release (12.0.0) was less than the versioncode(1104058) previous release (11.4.5)
I resolved this issue following this link Setting Android version code in Ionic 2
Update both versionCode and versionName.
minSdkVesion 16
targetSdkVesion 26
versionCode 2
versionName 1.1
In your config.xml file's <widget> element, add/increment the android-versionCode attribute by one:
<widget id="com.example.foo" version="1.0.1" android-versionCode="10001" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
After that, running a cordova clean android and cordova build android --release gave me an .apk that the Google Play Console accepted.
have you upgraded your versionCode from previous versionCode?
minSdkVesion 16
targetSdkVesion 26
versionCode 1 //you need to upgrade it from previous one
versionName 1.0
If you are Monaca Cloud IDE for building and you are facing this error You cannot make this version available because it does not allow existing users to upgrade to new APKs that have been added.
So here what is the problem, When you try to build APK then it generates a random number,
So make sure your new update version code is greater then this 10505
You can set in Monaca Cloud IDE version code
In the root of your project will be a config.xml file. It contains a widget node that has an attribute of version. 1.17.01 in Example: <widget id="com.myapp.mobile" version="1.17.01" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
During a cordova prepare operation, this config.xml file is merged into the manifest file for your platform (e.g. platforms\android\app\src\main\AndroidManifest.xml for Android). The merged manifest file will contain both a version code and version string generated from the version listed in the config.xml. Ex: <manifest android:hardwareAccelerated="true" android:versionCode="11701" android:versionName="1.17.01" package="com.myapp.mobile" xmlns:android="http://schemas.android.com/apk/res/android">
This version code 11701 will be what is listed on the play console.
To automatically set this version greater, you can add to your gradle.properties file a variable setting cdvVersionCodeForceAbiDigit=true which will automatically multiply the version by 10. Note this logic is laid out in the build.gradle file at the root of your platform app folder. There is other logic toggled with the cdvBuildMultipleApks variable to set different values based on product flavor (arm, x86, etc). But I think the recommended approach today is to upload a "bundle" and let Google automatically generate the separate apks for various device configurations.
I want to update my application. I changed the version code but when I try to install that application it won't succeed.
This error message is shown:
An existing package by the same name with a conflicting signature is
already installed
How to get previous version debug signature and set it in Android studio? Thanks
There are two parameters that remain in your build.gradle file of your app.
versionCode 1
versionName "1.0"
android:versionCode — An integer value that represents the version of the application code, relative to other versions.
android:versionName — A string value that represents the release version of the application code, as it should be shown to users.
Please refer this documentation to know more about this.
Also you can get the VersionName and VersionCode programatically, in this way --
PackageInfo pInfo = getPackageManager().getPackageInfo(this.getPackageName(), 0);
String versionName = pInfo.versionName;
int versionCode = pInfo.versionCode;
EDITED:
Please refer this documentation to create a debug.keystore file.
Hope this helps!
You just need to ensure that your phone doesn't have the same application already installed whilst you are trying to install the same application's new APK.
So before installing the application, follow the following steps: 1. Go to Settings of your phone and look for an option that lists all applications in your phone and try to find whether the application that you are trying to install is already listed. If it is, then uninstall it from there. 2. Usually uninstalling by following step 1 removes the application from your phone however, if you are using a tablet, sometimes Android still keeps the APK file in the downloaded directory. So come out of settings and find out "All files" folder. Look for your app's APK in "downloaded" folder inside "All files" folder and remove it from there too.
Once you have deleted your app by following the above steps then you can go ahead and install your app. Hopefully you won't see "an existing package by the same name with a conflicting signature is already installed" error message.
I tried to update my app in the playstore, to do that I changed my versioncode from 1 to 2:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="de.xamaxon.congstardatenverbrauch"
android:versionCode="2"
android:versionName="1.0.1">
When I'm uploading the app the developerconsole is saying, that I still use the version code 1 and there is no human support for German developer, so I hope someone is able to help me.
The version code and name get overridden by values in your build.gradle file. So edit your build.gradle and rebuild.
Typically, you would release the first version of your application with versionCode set to 1, then monotonically increase the value with each release, regardless whether the release constitutes a major or minor release.
So, maybe the problem because you didn't set version code in manifest file in the first release.
http://developer.android.com/tools/publishing/versioning.html
Could you please give me the full message google play have said? And what to buttons appeard when that message appeared.
I remember that a similar message faced me, and maybe there was a continue button.
Also, if you're in Android Studio, don't forget:
Build > Generate Signed APK...
I update my android manifest file with progressively increased version code and sign it with the store keys. After the signing, the version code is reset to previous value. Please help
I got the same problem recently ...u might be changing the versionCode in bin/manifest make sure its the main manifest.
And Check this hope it might help you....
Can't update VersionCode