Android - Google Play - Upload APK - android

I uploaded my first app to Google Play some weeks back, and everything works fine. However I have an update and need to push it to Google Play. I've done research and found that I needed to add the following to my manifest file:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.shouttag.mothership"
android:versionCode="2"
android:versionName="1.1" >
However, when I try to upload the signed APK file, I keep getting the dreaded "You need to use a different version code for your APK because you already have one with version code 1." error. Is this because in the first version, I didn't have the versionCode or versionName attributes?
Any guidance on how I can resolve this sitch?

If you're using Android Studio, make sure to also change the version in the build.gradle.

Related

Android Instant App in different project/branch

I have a normal installable app on my git main branch. Now I want to create an Instant version of that game on a branch. I have done everything as described here. And at version-codes it also says:
It's OK to develop your instant app and your installable app in two separate Android Studio projects.
This is, I guess, the same as having a separate branch.
This is what I have changed:
AndroidManifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.my.app.package"
xmlns:dist="http://schemas.android.com/apk/distribution"
android:targetSandboxVersion="2">
<dist:module dist:instant="true" />
<application ...>
<meta-data android:name="com.google.android.gms.instant.flavor" android:value="1337"/>
...
</application>
</manifest>
The targetSandboxVersion, dist:module and the meta-data.
In build.gradle I have added implementation "com.google.android.gms:play-services-instantapps:17.0.1" and set versionCode to 1.
But when I upload the app bundle it says that versionCode 1 is already used. But according to the quote above I think it should be possible to upload a bundle that only has the instant version. Am i doing something wrong?
For Instant App use version code lower than the version code of the standard/not-instant app.
It allows install of the standard version from the Instant version.
If you already have uploaded standard version, increase it's version code to eg. 100 and re-upload the standard version. Than use version code lower than 100 for the instant app.
Make sure app-bundle or apk with specific version code was not already uploaded, this includes also apk-s and bundles unsuccessfully uploaded and includes all versions of the app, both standard and instant.

Google Play Store Release Issue [closed]

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.

Android: Failure [INSTALL_FAILED_VERSION_DOWNGRADE], but version is already higher than published

guys!
I'm trying to update my android app, but I get this error message:
Upload Error Message
When I try to run the app on my device, I get this error:
Failure [INSTALL_FAILED_VERSION_DOWNGRADE]
You're trying to install apk with a lower versionCode that is already installed.
Either uninstall an app or increment the versionCode.
I have already increased the version code in AndroidManifest.xml (see code's first line below) and still get the same error.
<manifest android:hardwareAccelerated="true" android:versionCode="10101" android:versionName="1.1.1" package="com.ionicframework.fitme375349" xmlns:android="http://schemas.android.com/apk/res/android">
This app is an ionic project.
Any help? Don't know what else to do.
Guys!
Thanks for the help and support.
In some moment I set the version to 1.0.638 in Ionic config.xml. The androidManifest.xml generated had the versionCode 100638. When I increased the version in ionic config file to 1.0.639, the versionCode in AndroidManifest file was set to 10639 (don't know why). This is why I got the error in Google Play. After trying many different version numbers, I finally set the version in Ionic config file to 10.0.639 and the versionCode generated in AndroidManifest.xml was 100639. This version was accepted in google play.
Dont forget to change in app level build.gradle file.
You have to increase the app version code every time you made an update.
make the version code to 10102
<manifest android:hardwareAccelerated="true" android:versionCode="10102" android:versionName="1.1.1" package="com.ionicframework.fitme375349" xmlns:android="http://schemas.android.com/apk/res/android">

change version of app when updating on google developer

I uploaded my app on google developer market, and I decided to update the app because I made some changes on it, but it gives this error message:
Upload failed
You need to use a different version code for your APK because you already have one with version code 1.
how can I change the version of the app?
Open manifest and
do this
android:versionCode="2"
android:versionName="1.1"**
this is set up either in your build.gradle file or in your manifest
Change your Manifest file
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.xxx.xxx"
android:versionCode="8"
android:versionName="xxx-xxxxx-2-v1" >
Here VersionCode you have to change.

Changing version code in AndroidManifest not Working

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...

Categories

Resources