Android Studio program packaging steps

1. Click【Build】-->【Generate Signed Bundle/APK】-->【Build APK(s)】in the menu bar

2. Select APK, then click【Next】

3. The Key store path item is used to select the address of the program certificate. If there is no certificate for the first development program, create one

 4. Fill in the information

 5. The created certificate information will be automatically filled in, click [Next]

6. Selection of  build type and signature version . Among them, debug is the debug version , which contains debugging information and does not perform any optimization, which is convenient for program debugging. Release is a release version , and various optimizations are often carried out so that users can use it well. Here we choose releas. V1 and V2 in Signature Versions are the choice of signature version, among which V1 is verified by ZIP entry, so that APK can be modified after signing - files can be moved or even recompressed. Only checking the v1 signature will not affect anything, but the more secure verification method will not be used on 7.0. V2 is to verify all bytes of the zip file, not a single ZIP entry, so after signing it cannot be changed (including zipalign). Because of this, we now combine minification, alignment, and signing into one step during compilation. The benefits are obvious, more secure and the new signature reduces verification time on the device (no need for time-consuming decompression and verification), resulting in faster app installation. Only check the V2 signature below 7.0, it will be installed directly and it will be displayed as not installed, and the V2 method will be used for verification above 7.0, and all models will be fine if both V1 and V2 are checked at the same time . Finally click Finish.

7. After the packaging is completed, open the path where the apk was stored just now. The program has been packaged and can be installed and run on an Android phone, and can also be placed in the market for others to download.

Guess you like

Origin blog.csdn.net/m0_62404144/article/details/127161171