Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the version of app in android studio

I have uploaded an app in Play Store before and now I created second version of that app and ready to upload in Play Store. I changed the version name and code in build.gradle(Module:app) from 1 to 2. It took that Version code but while uploading the app in google play console , But in Google Play Console It is showing that this version already exists. Change the version and upload again.

like image 240
Abhisek Mishra Avatar asked Oct 12 '25 16:10

Abhisek Mishra


2 Answers

In build.app have youe changed both version code and version name

android {
compileSdkVersion 27
defaultConfig {
    applicationId "com.sb.android.acg.test"
    minSdkVersion 17
    targetSdkVersion 27
    versionCode 1      // update this
    versionName "1.0"  // update this
    multiDexEnabled true
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

To answer Eric's question

1:find the "Project" toolbar (if you are using windows press Alt+1)
2:Inside Project make sure you have opened Android option and not project or any other(it's located on the top of the window you just opened)
3:Open "Gradle scripts"
4:Click build.gradle (Module:app)

like image 175
Kevin Kurien Avatar answered Oct 14 '25 05:10

Kevin Kurien


It's very easy to do. Follow the simple steps

  1. Right-click on the app folder ---> Open Module Settings

enter image description here

  1. Select Modules from the left panel, under the Default Config tab, update the Version Code and Version Name.

enter image description here

Version Code always is an integer. You have to update it every time when you release new version of the application.

You can set the Version Name according to your needs. As an example, if you fix minor bugs or update, your Version Name like 2.1, 2.2, etc If you fix major bugs or add more features your Version Name should like 3.0, 4.0, etc.

like image 26
Mir Rahed Uddin Avatar answered Oct 14 '25 07:10

Mir Rahed Uddin