Skip to main content

How To Increase The Android APK Version Number In Android Studio

Problem :
While updating the android app in google play store I am seeing an error message as You need to use a different version code for your APK or Android App Bundle because you already have one with version code 1.

Solution : 

1) Open your android application in Android Studio .
2) Open build.gradle(Module: app)
3) Increase the version number and version name as shown in the below code
2) Go to Generate Signed Bundle Or APK  and choose APK option and finish .Your latest apk will be generated in \app\release folder in your local .

android {
compileSdkVersion 29    
buildToolsVersion "29.0.3"   
applicationId ""        
minSdkVersion 15        
targetSdkVersion 29        
versionCode 2
versionName "2.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
buildTypes {
     release {
     minifyEnabled false            
    proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), ''


Popular posts from this blog

Angular cli ng command is not working

Problem : angular cli command  ng is not working

'ng' is not recognized as an internal or external command,
operable program or batch file.

Solution :

update .npmrc file at C:\Users\{USERNAME}
with the below line


warning: LF will be replaced by CRLF in

Problem :

The file will have its original line endings in your working directory


step1) open .gitconfig file

step2) paste the below code

autocrlf = false
[filter "lfs"]
required = true
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process

Download file with extension for internet explorer and chrome using javascript

SOLVED Problem Statement :
Internet explorer download file does not shows file extension

Solution : java script code that append file type extension

function save() { var fileUrl = "${fileUrl}"; var fileName = "${fileName}"; var mimeType = "${mimeType}"; var ie = navigator.userAgent.match(/MSIE\s([\d.]+)/), ie11 = navigator.userAgent .match(/Trident\/7.0/) && navigator.userAgent.match(/rv:11/), ieEDGE = navigator.userAgent .match(/Edge/g), ieVer = (ie ? ie[1] : (ie11 ? 11 : (ieEDGE ? 12 : -1))); if (ie && ieVer < 10) { console.log("No blobs on IE ver<10"); return; } if (ieVer > -1) { console.log(" blobs on IE ver>10"); //,"_self");        var xhr = new XMLHttpRequest();'GET', fileUrl, true); xhr.responseType = 'blob'; xhr.onload = function(e) { if (this.status == 200) { var myBlob = this.response; downloadFileForIE(myBlob, fileName, mimeType); } }; xh…