uniapp Android offline packaging steps
-
-
-
- 1. Android offline SDK download
- 2. Download Android Studio
- 3. Prepare the Android signature certificate file, generally the company will provide it, if not, the process is as follows:
- 4. Unzip the downloaded Android offline SDK, find the HBuilder-Integrate-AS folder, enter HBuilder-Integrate-AS\simpleDemo\src\main\assets\apps , delete the original files under the apps folder
- 5. Open the project with the HBuildX editor, and operate Publish -> Native APP Local Package -> Generate Local Package APP Resource
- 6. Copy the entire __UNI__XXXX folder resource package of unpackage/resources/__UNI__XXXX above to HBuilder-Integrate-AS\simpleDemo\src\main\assets\apps
- 7. Open Android studio and import the HBuilder-Integrate-AS folder as a new project
- 8. In the simpleDemo/src/main/assets/data/dcloud_control.xml file, modify the appid to __UNI__XXXX of your own project
- 9. Configure the project package name under simpleDemo/build.gradle and simpleDemo/src/main/AndroidManifest.xml , the format of the package name is XXX.XXX.XXX
- 10. Put the previously generated APP Key into simpleDemo /src/main/AndroidManifest.xml
- 11. Under simpleDemo/build.gradle , configure keyAlias (package name, uniapp application ID) keyPassword and storePassword are cloud certificate passwords
- 12. Download the previously generated Android cloud certificate file, rename it, and put it in the simpleDemo folder
- 13. Generate signature file
-
-
1. Android offline SDK download
Android Offline SDK - Official Version (Note: The version used by HBuilderX should be consistent with the downloaded sdk version)
2. Download Android Studio
Android Studio download file (note: the version should be above 4.0)
3. Prepare the Android signature certificate file, generally the company will provide it, if not, the process is as follows:
Type 1: Manually generate by yourself
Type 2: Automatically generated by Dcloud Developer Center
Attachment: How to generate an Android cloud certificate for uniapp Android offline packaging
4. Unzip the downloaded Android offline SDK, find the HBuilder-Integrate-AS folder, enter HBuilder-Integrate-AS\simpleDemo\src\main\assets\apps , delete the original files under the apps folder
5. Open the project with the HBuildX editor, and operate Publish -> Native APP Local Package -> Generate Local Package APP Resource
6. Copy the entire __UNI__XXXX folder resource package of unpackage/resources/__UNI__XXXX above to HBuilder-Integrate-AS\simpleDemo\src\main\assets\apps
7. Open Android studio and import the HBuilder-Integrate-AS folder as a new project
Note: The path where the file is stored should not have a Chinese file name, otherwise an error will be reported when packaging later
8. In the simpleDemo/src/main/assets/data/dcloud_control.xml file, modify the appid to __UNI__XXXX of your own project
9. Configure the project package name under simpleDemo/build.gradle and simpleDemo/src/main/AndroidManifest.xml , the format of the package name is XXX.XXX.XXX
10. Put the previously generated APP Key into simpleDemo /src/main/AndroidManifest.xml
11. Under simpleDemo/build.gradle , configure keyAlias (package name, uniapp application ID) keyPassword and storePassword are cloud certificate passwords
12. Download the previously generated Android cloud certificate file, rename it, and put it in the simpleDemo folder
13. Generate signature file
Note: If the Android Studio package does not have the Generate Signed Bundle/APK option, please refer to the following article to configure
The latest solution to Android Studio packaging has no Generate Signed Bundle/APK option
Fill in the following information truthfully, where Key store path is the storage path of the cloud certificate, password is the password of the cloud certificate, key alias is the directory name (uniapp application identifier), click Next and finally select release, and click Finish to enter the packaging state
. The packaged file is placed in the release directory and the name is simpleDemo-release.apk
The above is the whole content of uniapp Android offline packaging steps ! , if you think it is helpful to you, like + follow + bookmark~, we are on the front-end road together, and work hard together! Go, go, go! ! !