uni-app Android packaging problem

uni-app Android packaging problem

1. Download the SDK package, which must be consistent with the local Hbulidrx version
Insert picture description here

2. Use android studio to open the Hbuilde-hello project in the downloaded sdk package directory, click file> open, select the folder you want to open, and click ok
Insert picture description here

3. Switch to project view
Insert picture description here

4. Right-click the project under the assets directory, click show in Explorer, return to the previous level in the opened file, and delete the helloH5 directory
Insert picture description here

5. After generating the local resource package, put the resource file in the folder location you just deleted, (as shown below)
Insert picture description here

6. Return to Androidstudio to modify the file dcloud_control.xml, and modify the red box location to be the id value of the manidest.json of the packaged resource
Insert picture description here

7.androidManifest.xml package is the package name of the project, you can set it yourself. The applicationId in the build.gradle file should be consistent with the package name.
Insert picture description here

Insert picture description here

8. Modify the application name
Insert picture description here

9. To use the map, you need to manually modify the secret key. I am using Gaode map here.
Insert picture description here
11. Set the keystore, put the locally generated keyStore file in the project folder, and select the project stand-alone right click (see the bottom of the document for the keystore generation method)
Insert picture description here

12. Fill in the keyStore information in the pop-up interface
Insert picture description here

13. Choose to make a formal package

Insert picture description here

=Problems encountered

  1. Package cannot be installed automaticallyInsert picture description here

  2. The startup page can find the picture in the android studio editor. After selecting it, right-click the image below to generate a 9.png startup picture, which can be adapted to different sizesInsert picture description here

  3. Signature certificate generation method command: first execute the cd C:\Program Files\Java\jdk1.8.0_131\bin command (this is the directory of my computer), enter the jdk directory, and then execute it according to the command below
    Insert picture description here

  4. Signing certificate generation reference document https://blog.csdn.net/weixin_41881186/article/details/80199622

  5. View detailed information such as keystore security code C:\Program Files\Java\jdk1.8.0_131\bin>keytool -list -v -keystore D:\shiYanPingTai.keystore -storepass 111111

  6. After packaging, it prompts that custom components cannot be used, resulting in a white screen. Solution:
    Copy the uniapp-release.arr file in the downloaded SDK package to the project libs folder and repackage

Insert picture description here
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_42407989/article/details/109580567