Press SHIFT+CTRL+ALT+S (or File -> Project Structure -> app)
Android Studio < 3.4:
Choose tab 'Flavors'
The last two fields are 'Version Code' and 'Version Name'
Android Studio >= 3.4:
Choose 'Modules' in the left panel.
Choose 'app' in middle panel.
Choose 'Default Config' tab in the right panel.
Scroll down to see and edit 'Version Code' and 'Version Name' fields.
Last Updated: June 8, 2021