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"
}
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
You uploaded an APK with an invalid signature (learn more about signing). Error from apksigner: ERROR: MIN_SIG_SCHEME_FOR_TARGET_SDK_NOT_MET: Target SDK version 30 requires a minimum of signature scheme v2; the APK is not signed with this or a later signature scheme
when signing apk it will show you signature versions below remember to check V2 Full APK Signature or start using AAB
V2 Signing is minimum Signature Scheme as of now and V3 is also on the line for more details refer this link and to know more about app signing refer this link.
You need to update version min 30
compileSdkVersion 30
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.xxx.xxxxd"
minSdkVersion 21
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
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
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.
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.