uni-app 离线打包DEMO无法运行
uni-app 离线打包DEMO无法运行
操作步骤:
- 点击运行
预期结果:
- 正常运行
实际结果:
- 提示错误
bug描述:
最新版sdk uniapp Demo离线打包后提示当前环境无法运行启用“自定义组件模式”、“打包时未添加UI模块”。 sdk版本:3.1.13 hbuilderX版本:3.1.13 AS版本:4.2
图片

更多关于uni-app 离线打包DEMO无法运行的实战教程也可以访问 https://www.itying.com/category-93-b0.html
1 回复
更多关于uni-app 离线打包DEMO无法运行的实战教程也可以访问 https://www.itying.com/category-93-b0.html
离线打包失败通常是由于SDK配置问题导致的。根据错误提示“自定义组件模式”和“打包时未添加UI模块”,建议检查以下配置:
-
在项目的
build.gradle中确保已正确引入uni-app SDK依赖:implementation 'com.github.dcloudio.uni-app:core:3.1.13' implementation 'com.github.dcloudio.uni-app:ui:3.1.13' -
确认
AndroidManifest.xml中已启用自定义组件模式:<meta-data android:name="uni-app" android:value="customComponent=true" /> -
检查是否遗漏了必要的原生模块。在
build.gradle的dependencies中添加缺失的UI模块:implementation 'com.github.dcloudio.uni-app:uni-ui:3.1.13'

