Why to pack:
- APK file is a package, package is to build the APK file, with the APK others can be installed to use. Packaged in the debug version and release package, commonly referred to as packaging refers to the generation of release version of the apk,release version of the APK will be smaller than the debug version of the release version will be confused and with their own keystore signature, To prevent others from being re-packaged and replacing your app.
The simple point is to give your APK ID card, on the account, to prevent and you long the same person, fake you. The APK ID here is our ". JKs" file. So this jks file is very important.
If you have the same code, generate two JKs file packages, that represents two software.
* * Packaging Of course there are many ways, you can use as the signature, but also through the gradle signature, etc., here to talk about the conventional. **
Conventional as packaging consists of two main types:
- One is no packaging for ". JKs" Files
- One is the packaging of a ". JKs" File
One, no packaging of ". JKs" Files
First we choose Build--Generate signed APK
will appear:
Because we do not have a key (ID) so we are going to generate a key, so here we choose Create New ...
(Note: There are two "key password" because one is the password of the key, one is the password of key, but usually we set the time will choose to set the same, so as to facilitate our memory, so here are considered the key password. )
Select Create New ... The following will appear:
After clicking OK, the file is selected and the JKs file is generated.
After clicking OK, the following will appear:
These are all automatically brought out.
If you remember the password, you can choose to remember the password if you are afraid of forgetting it.
Next is next.
Finally click Finish
This is the point where Android Studio will appear
Compiling, when the upper-right corner of the as appears
Indicates a successful package
Click directly to open the location of the generated APK file
Ii. packaging of ". JKs" Files
First we choose Build--Generate signed APK
Select already exists, and then open the folder to find the corresponding ". JKs" File
My jks file is placed on the e-disk, called Test.jks click OK
The alias is test, enter the password, click Next, follow the steps, and the same as above.
Summary of this chapter:
Note: There are a lot of ways to build the APK, and here's a simple one, and it's interesting to look at other ways.
Android Studio Super Simple package build apk