uni-app cloud packaging process organization
First, register an HBuilder account via email, and the registration URL is https://dev.dcloud.net.cn/#/pages/common/login
Notice
- The password needs to be changed, otherwise the password error will be reported when logging in to HBuilder.
- Verify the phone number in the account information in the personal center (otherwise the package cannot be processed)
1.manifest.json configuration
Use HBuilder X to open the project, open the manifest.json file, and click the "Reacquire" button to obtain the unique APPID. After obtaining it, the corresponding new application will be automatically generated under application management.
Note: The same email account can obtain different APPIDs with different file names. It is best to apply for different APPIDs for different apps, otherwise the mobile phone system will think that the new app and the previous app are the same, but with different versions, that is, they cannot be installed at the same time.
In addition to the APPID, the basic configuration can also configure the application name and version. For startup configuration, select "Universal startup page"
2. Obtaining cloud packaged certificates
1) Select Distribution->Cloud Packaging
2) You can choose a local certificate or a cloud certificate when packaging
Note: When selecting a cloud certificate, you must cancel the opening screen advertisement
- When using your own certificate
Apply through the command line (requires computer to install jre environment)
keytool -genkey -alias testalias -keyalg RSA -keysize 2048 -validity 36500 -keystore test.keystore
View the details of your own certificate through the command line. Note that the file names must be consistent.
keytool -list -v -keystore test.keystore
Enter keystore password: //输入密码,回车
- When using cloud certificate
Create and view it in the Developer Center (the account needs to be verified by phone). After the certificate is generated, you can click "Certificate Details" to view it.
3. Packaging completed
After clicking Package, the compiled and packaged resources will be displayed.
Packaged successfully, click on the download address to get the apk file