Current location - Quotes Website - Signature design - How to package react native into apk
How to package react native into apk
Step one: sign.

Open Android Studio, click Build-> Generate Signed APK in the menu bar, and click Next in the opened interface to open the following interface.

Then click New and select the location, name and password of the key in the pop-up interface. Also write the name of the alias, the owner, country, organization and city of the certificate.

Note: the name of our app here is jd, and the alias is jd_alias. The passwords of the name and alias are the same.

Click OK to fill in the created signature information by default.

Finally, clicking finish will generate a signing key.

The second part:

The signature of the APP has been completed through the above steps! Let's start the real packaging!

1. Gradient configuration:

1. First, we need to copy the newly generated signature file to the android/app folder of the project (your xxx.jks file path may be different from mine, but it doesn't matter if you copy it to this andrid/app path).

Then modify the gradle.properties file in the project and add the following code (note that the names of the signatures and aliases below are the same as those of the test.jks put in the previous step, and the passwords of the signatures and aliases are filled in for the following two items respectively)-my password is ztt 12345.

In this step, we will configure the global gradlde in a variable way, and then sign the corresponding application in the following steps.

[Note]. Please take good care of the above signing key, because it is needed when the application is published.