0

Can anyone tell me how to generate signed apk of next version of any app in android studio??? In which file do I have to update? I am not familier with android studio

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.2"

    defaultConfig {
        applicationId "com.app"
        minSdkVersion 11
        targetSdkVersion 21

    }
Jonas
  • 121,568
  • 97
  • 310
  • 388
Khushal Chouhan
  • 103
  • 1
  • 7

2 Answers2

0

add the lines versionCode and versionName below the line targetSdkVersion 21

For example if your app version is 1.0 your gradle file will be

android {
compileSdkVersion 21
buildToolsVersion "21.1.2"

defaultConfig {
    applicationId "com.app"
    minSdkVersion 11
    targetSdkVersion 21
    versionCode 10
    versionName "1.0"
}

and if your app version is 2.0.3 your gradle file will be

android {
compileSdkVersion 21
buildToolsVersion "21.1.2"

defaultConfig {
    applicationId "com.app"
    minSdkVersion 11
    targetSdkVersion 21
    versionCode 203
    versionName "2.0.3"
}
Danish Ansari
  • 451
  • 1
  • 6
  • 22
0
  1. Scroll to the left of the screen in Android Studio and click on build variants.
  2. Select "release".
  3. Scroll to the top of the screen and select "Build".
  4. Select "Generate Signed Bundle/APK".
  5. Create a new keystore and SAVE YOUR PASSWORD
  6. Finally, select "Generate" or "Build" and after a bit a file will appear called something like "release.apk".

Here is the google documentation: Here