Android (uni-app) platform packaged locally

1. Prepare

Tools needed: Android Studio, HBuilderX ()
to download the latest SDK package uniapp Andrews needed https://ask.dcloud.net.cn/article/103
note : HBuilderX version, SDK have the latest
Here Insert Picture Description

2. Offline Directory SDK package instructions

HBuilder-Hello: offline package your application;
HBuilder-Integrate: 5+ SDK integration and plug-in development example
libs: SDK library directory;
the Feature list .xls: Android platform Feature API extensions each corresponding permission;
the Readme.txt: File Release Notes .

3. Unzip the file downloaded, open android studio, choose Import Project HBuilder-Hello

Here Insert Picture Description

4. start coming shows the android, and then click change for the project

Here Insert Picture Description
Here Insert Picture Description

5. demo run official, and using a mobile phone running the debugger Note: This need to connect your phone to a computer, only this (need to open the phone developer mode, usb debugging, set up inside the phone)

If there is no module , please refer to: https://blog.csdn.net/chenbinqq/article/details/87395458

Here Insert Picture Description

6. Open HBuilderX written project, click on the issuance > Native app- local packaging > generate a local resource packing , packaging is complete, HBuilderX console output package information and package path;
Here Insert Picture Description

7. Open HBuilder-Hello> app> src> main> assets> apps> HelloH5 where local folder

Here Insert Picture Description

8. Delete the original android studio www folder, www files and folders copied into HBuilderX

Open www> manifest.json the id, Change:
Open data> dcloud_control.xml in appid
open the original package name apps.HelloH5.www in HelloH5 and change the
name of these three places must be consistent, otherwise unable language page show

Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description
Replacement is completed, run to the phone again, successfully demonstrated their written application interface.

9. pack apk, android studio> build> Generate Signed Bundle / APK, create a new file or select the original jks jks, all the way to the next step until completion;

Here Insert Picture DescriptionHere Insert Picture DescriptionHere Insert Picture DescriptionHere Insert Picture Description

So far, uniapp Andrews local package complete;
Android platform offline package authorized landing plug-in configuration please refer https://ask.dcloud.net.cn/article/211

Published 31 original articles · won praise 5 · Views 812

Guess you like

Origin blog.csdn.net/weixin_45899022/article/details/103262685