离线打包准备 下载Android studio
1.准备资源hbuilder
2.准备离线SDK
最新android平台SDK下载最新android平台SDK下载
3.离线打包key申请
4.直接导入HBuilder-Integrate-AS工程,直接运行simpleDemo项目即可
5.安装java 1.8 jdk-8u151-windows-x64
6.遇到这个报错报错Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
File | Settings | Build, Execution, Deployment | Build Tools | Gradle设置java1.8 即可
之后同步一下File | async project with gradl files 等待
7.替换打包文件assets/apps里面的整体E:\BaiduNetdiskDownload\Android-SDK@3.8.12.81924_20230817\HBuilder-Integrate-AS\simpleDemo\src\main\assets\apps
8.改报名 AndroidManifest.xml文件 和下面离线key
9.打包的权限要粘贴进来避免摄像头打不开等
10. android:screenOrientation="sensorLandscape"这个是横屏替换成自己的一般是user
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="uni.UNI123456">
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE\"/>
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>
<uses-permission android:name="android.permission.VIBRATE\"/>
<uses-permission android:name="android.permission.READ_LOGS\"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE\"/>
<uses-feature android:name="android.hardware.camera.autofocus\"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE\"/>
<uses