How to change the version of the application in android studio? [duplicate]

this question already has an answer here : can't update my app on google play? (1 response) Closed 5 years ago.

I am about to launch an application and I know that at some point I will make updates, but I did not find in the tool the place to change the version of the app, since it is different from eclipse ADT, which was in androidmanifest itself. Does anyone know how??

 2
Author: byteman, 2015-03-05

1 answers

In android studio inside the build file.gradle you will find a code that neither what is below:

defaultConfig {
    minSdkVersion 8
    targetSdkVersion 19
    versionCode 1
    versionName "1.0"
}

Where versionCode comes from is usually the code used internally for application to make a comparison. If you have a database, you can use this code to update the tables if it changes. the versionName and the code visible to the user.

If you do not have this block and then copy and paste it into

 4
Author: dariodm, 2015-03-05 23:02:34