Android studio super simple packaging method for generating apk

This article introduces the super simple package generation APK of Android studio, which can be shared with you and left a note for yourself.

Why package:

Apk file is a package. Packaging is to generate APK files, which can only be installed and used by others. Packaging is divided into debug version and release package. Generally speaking, packaging refers to generating the APK of the release version. The APK of the release version will be smaller than that of the debug version. The release version will also be confused and signed with its own keystore to prevent others from decompiling and repackaging to replace your application.

Simply put, it is to give your APK an ID card and a registered permanent residence to prevent people who look the same as you from counterfeiting you. The APK ID card here is our ". JKS" file. So this JKS file is very important. If you package two JKS files with the same code, it represents two software.

**Of course, there are many ways to package. You can use the signature provided by as or gradle. Let's talk about the conventional one here**

There are two main types of conventional as packaging:

1、 There is no packaging for ". JKS" files

First, we select build - > generate signed APK

The following message appears:

Because we don't have a key (ID card), we need to generate a key, so here we choose create new... (Note: there are two "key passwords" Because one is the password of the key and the other is the password of the key, but usually we choose to set the same one when setting, so it is convenient for us to remember, so we all think it is the password of the key.)

After selecting create new... The following message appears:

Click OK to select the file and generate the JKS file.

After clicking OK, the following message will appear:

These are brought out automatically

Whether to remember the password. If you are afraid of forgetting the password, you can choose to remember the password.

Next is next

Finally, click finish

This is the point where Android studio will appear

Compiling, when as appears in the upper right corner

Indicates that the package was successful

Click to directly open the location of the generated APK file

2、 Packaging with ". JKS" file

First, we select build - > generate signed APK

Select an existing file, then open the folder and find the corresponding ". JKS" file

My JKS file is placed on disk e, called test.jks, and click OK

The alias is test. Enter the password and click next. The following steps are the same as those above.

Summary of this chapter:

Note: there are many ways to generate APK by packaging. Here is a simple one. If you are interested, you can see other methods.

The above is the whole content of this article. I hope it will be helpful to your study, and I hope you can support programming tips.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>