uni-app Android packaging problem
1. Download the SDK package, which must be consistent with the local Hbulidrx version
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
3. Switch to project view
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
5. After generating the local resource package, put the resource file in the folder location you just deleted, (as shown below)
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
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.
8. Modify the application name
9. To use the map, you need to manually modify the secret key. I am using Gaode map 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)
12. Fill in the keyStore information in the pop-up interface
13. Choose to make a formal package
=Problems encountered
-
Package cannot be installed automatically
-
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 sizes
-
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
-
Signing certificate generation reference document https://blog.csdn.net/weixin_41881186/article/details/80199622
-
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
-
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