HBuilder+uni-app+Android Studio generates local apk

1. Create the uni-app project in HBuilder and obtain the AppID

Insert image description here

2. Packaging

Insert image description here
After successful packaging, resource files will appear ( changed resource files need to be copied to the Android Studio project later )
Insert image description here

3. Download Android Studio and Android offline SDK

Android Studio

Android offline SDK
Insert image description here
Insert image description here

After downloading the Android offline SDK, you will get this directory and Insert image description here
import HBuilder-Integrate-AS into Android Studio.
Insert image description here

4. Copy the resources packaged in HBuilder to Android Studio

You need to delete the first project and then copy ours into it
Insert image description here

5. Apply for offline packaging Key and key

Developer Center
Insert image description here
Insert image description here
Insert image description here

Insert image description here
Insert image description here
This package name is filled in the package name of the offline key applied for.
Insert image description here
After the creation is successful, apply for the offline packaging key.
Insert image description here

6. Modify configuration information

Insert image description here
<provider android:name="io.dcloud.common.util.DCloud_FileProvider" android:authorities="com.android.simple.dc.fileprovider" android:exported="false" android:grantUriPermissions="true"> <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/dcloud_file_provider" /> </provider>
Insert image description here

7. Start generating APK

Insert image description here
Insert image description here
Insert image description here
The generated APK is sent directly to the mobile phone for installation.
Insert image description here

8. Other configuration information

Insert image description here

Guess you like

Origin blog.csdn.net/qq_42048638/article/details/129959140