android studio generates apk package

1. The configuration file sets the apk version and name

defaultConfig {
        applicationId "test"
        minSdkVersion 19
        targetSdkVersion 30
        //版本
        versionCode 1
        versionName "1.0"
    }

android.applicationVariants.all {
        variant ->
            variant.outputs.all {
                // 此处指定生成的apk文件名
                outputFileName = "test.apk"
            }
    }

二.build->Generate Signed APK

3. There is no key file, click create new

 Set custom path and name

 

 4. The release directory will be generated in the project directory, and the apk package will be found

 

 

 

 

Guess you like

Origin blog.csdn.net/yiye2017zhangmu/article/details/123871645
Recommended