Use HBuilderX for packaging
1. Change the index access path
Create file vue.config.js in the vue_cli scaffold and add publicPath to the file: “/” modifiable index.html access to the resource path, so that you can find the index.html in the public file double-click to access the browsing page
2. Package file instructionnpm run build
In the written VUE project, run the NPM run build at the terminal
The dist folder will be generated in the directory (the code inside is compressed)
3. Open HBuilderX to create A new project and select 5+APP (A)
After the creation is complete
Copy HTML, JS, CSS, img from dist folder to 5+App created by **HBuilderX **
Click on manifest.json to configure
Basic configuration
Icon configuration
Tip: It is not feasible to directly change the suffix of the image to PNG format (new test)
Startup Configuration
You can set the delay for automatically closing the startup screen in milliseconds
The module configuration
APP commonly used other Settings
- When selecting a supported CPU type, see the following suggestions:
- If you don’t care about the APK size, check all three CPU types
- If you care about apK size, select ARM32 bits (it works on almost all devices with all ARM instructions).
- If you want to be compatible with some tablets and emulators, choose ARM 32-bit and X86
- Not all simulations support x86 instructions only, emulators such as Thunderbolt (4.x) and MuMu also support ARM instructions.
Release -> Native App- Cloud packaging
Prompt you to install the secure package plugin
There will be waits in the console
An error occurs. The local installation package fails to be generated. Please try again or switch to the non-secure packaging mode
-
Viewing error Logs
(Found Chinese in path, causing packing errors)
Android Cloud Packaging FAQ summary
Error: The image format is not correct. The application icon and startup image are required to be in PNG format. Other formats (such as JPG) will report an error.
Solution: Please check whether the application icon has formatting problems, and submit the package in PNG format strictly according to the specified size. Icon files and startup images need PNG images. Users can add images of specified size according to HBuilder prompts or modify the reference of the image by modifying the manifest file. The specific modification method can be referenced, and be sure not to rename JPG and other files to PNG for use. If the icon does not change after packaging, it may be because of cache, restart the phone to try.Copy the code
Cause: The application name contains special characters such as @
Solution: Change the application name to remove special charactersCopy the code
Error cause: APP blank after packaging
Solution:
1. Check whether the appID of the application is modified.
2. Parsing fails due to special characters. Check whether the folder contains special characters
3. After the package is complete, a path will be returned. Follow the path to find the file with the suffix apK.
“Likes, Favorites and comments”
❤️ Follow + like + add + comment + forward ❤️, encourage me to create better articles, thank you 🙏 everyone.