8***@qq.com
8***@qq.com
  • 发布:2023-03-31 09:34
  • 更新:2023-06-17 20:52
  • 阅读:439

Hbuilder3.4.7升级至3.7.7版本之后,项目在Android手机【启动】运行闪退

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: 11

HBuilderX类型: 正式

HBuilderX版本号: 3.7.7

手机系统: Android

手机系统版本号: Android 12

手机厂商: 小米

手机机型: Redmi K30 Pro

页面类型: vue

vue版本: vue3

打包方式: 云端

项目创建方式: HBuilderX

示例代码:

代码地址:https://gitee.com/xiaonuoadmin/snowy-mobile.git

操作步骤:

使用3.7.7版本和builder编辑器 下载项目https://gitee.com/xiaonuoadmin/snowy-mobile.git=》执行npm intsall命令=》运行到手机或模拟器-》运行到Android App基座

预期结果:

正常安装并运行,之后会跳转至登录页面

实际结果:

Android手机启动运行闪退,日志如下

2023-03-31 08:59:43.535 [WARNING:] QLayout: Cannot add a null widget to QVBoxLayout/
2023-03-31 08:59:43.535 [WARNING:] QLayout: Attempting to add QLayout "" to ExtFormDialog "", which already has a layout
2023-03-31 08:59:43.535 [WARNING:] QLayout: Attempting to add QLayout "" to ExtFormDialog "", which already has a layout
2023-03-31 08:59:46.863 [WARNING:] [PluginHost] refreshListData: QJsonValue(object, QJsonObject({"checkedBaseIndex":1,"code":2,"device":{"name":"b7e553d4","platform":"android","runState":1,"runStateStr":"已运行在项目[ent-snowy-mobile]","udid":"b7e553d4","version":"12"},"userData":{"checkedBaseIndex":1,"cli":false,"platform":"android","runningDevices":[{"udid":"b7e553d4","workspaceFolder":{"appid":"UNI1B43AC2","id":"{d3baa092-8ca8-40b9-bad7-664eba487869}","metatype":"WorkspaceFolder","name":"ent-snowy-mobile","nature":"UniApp_Vue","uri":{"authority":"","fragment":"","fsPath":"C:/mine/dev/workspace/uniapp/ent-snowy-mobile","metatype":"Uri","path":"/C:/mine/dev/workspace/uniapp/ent-snowy-mobile","query":"","scheme":"file"},"vueVersion":"3"}}],"workspaceFolder":{"id":"{d3baa092-8ca8-40b9-bad7-664eba487869}","name":"ent-snowy-mobile","nature":"UniApp_Vue","uri":{"$mid":1,"external":"file:///c%3A/mine/dev/workspace/uniapp/ent-snowy-mobile","fsPath":"c:\mine\dev\workspace\uniapp\ent-snowy-mobile","path":"/C:/mine/dev/workspace/uniapp/ent-snowy-mobile","scheme":"file"}}}}))
2023-03-31 08:59:46.902 [WARNING:] uniapp compiled errorOccurred====== "进程已崩溃"
2023-03-31 08:59:49.686 [INFO:] node "C:/mine/dev/Hbuilder/HBuilderX.3.7.7.20230316-alpha/HBuilderX/plugins/node/node.exe"
2023-03-31 08:59:49.686 [INFO:] args ("--max-old-space-size=2048", "--no-warnings", "C:/mine/dev/Hbuilder/HBuilderX.3.7.7.20230316-alpha/HBuilderX/plugins/uniapp-cli-vite/node_modules/@dcloudio/vite-plugin-uni/bin/uni.js", "-p", "app")
2023-03-31 09:00:08.797 [WARNING:] [PluginHost] wifiserverClose 1006

bug描述:

Hbuilder3.4.7升级至3.7.7版本之后,Android手机启动运行闪退,日志如下

2023-03-31 08:59:43.535 [WARNING:] QLayout: Cannot add a null widget to QVBoxLayout/
2023-03-31 08:59:43.535 [WARNING:] QLayout: Attempting to add QLayout "" to ExtFormDialog "", which already has a layout
2023-03-31 08:59:43.535 [WARNING:] QLayout: Attempting to add QLayout "" to ExtFormDialog "", which already has a layout
2023-03-31 08:59:46.863 [WARNING:] [PluginHost] refreshListData: QJsonValue(object, QJsonObject({"checkedBaseIndex":1,"code":2,"device":{"name":"b7e553d4","platform":"android","runState":1,"runStateStr":"已运行在项目[ent-snowy-mobile]","udid":"b7e553d4","version":"12"},"userData":{"checkedBaseIndex":1,"cli":false,"platform":"android","runningDevices":[{"udid":"b7e553d4","workspaceFolder":{"appid":"UNI1B43AC2","id":"{d3baa092-8ca8-40b9-bad7-664eba487869}","metatype":"WorkspaceFolder","name":"ent-snowy-mobile","nature":"UniApp_Vue","uri":{"authority":"","fragment":"","fsPath":"C:/mine/dev/workspace/uniapp/ent-snowy-mobile","metatype":"Uri","path":"/C:/mine/dev/workspace/uniapp/ent-snowy-mobile","query":"","scheme":"file"},"vueVersion":"3"}}],"workspaceFolder":{"id":"{d3baa092-8ca8-40b9-bad7-664eba487869}","name":"ent-snowy-mobile","nature":"UniApp_Vue","uri":{"$mid":1,"external":"file:///c%3A/mine/dev/workspace/uniapp/ent-snowy-mobile","fsPath":"c:\mine\dev\workspace\uniapp\ent-snowy-mobile","path":"/C:/mine/dev/workspace/uniapp/ent-snowy-mobile","scheme":"file"}}}}))
2023-03-31 08:59:46.902 [WARNING:] uniapp compiled errorOccurred====== "进程已崩溃"
2023-03-31 08:59:49.686 [INFO:] node "C:/mine/dev/Hbuilder/HBuilderX.3.7.7.20230316-alpha/HBuilderX/plugins/node/node.exe"
2023-03-31 08:59:49.686 [INFO:] args ("--max-old-space-size=2048", "--no-warnings", "C:/mine/dev/Hbuilder/HBuilderX.3.7.7.20230316-alpha/HBuilderX/plugins/uniapp-cli-vite/node_modules/@dcloudio/vite-plugin-uni/bin/uni.js", "-p", "app")
2023-03-31 09:00:08.797 [WARNING:] [PluginHost] wifiserverClose 1006

2023-03-31 09:34 负责人:无 分享
已邀请:
DCloud_HB_WDL

DCloud_HB_WDL

是应用安装到手机上后,在手机上启动应用,应用闪退? 不是HBuilderX闪退吧。

如果是app闪退,检查下代码。

  • 8***@qq.com (作者)

    可是Hbuilder3.4.7版本的时候是正常的

    2023-03-31 10:16

1***@qq.com

1***@qq.com

我也是同样报错 ,停在正在写入程序,cmd执行 adb 报错是device no found(但是都连上了并成功安装了基座了?)。从3.8.4切换到3.7.3 3.1.2都不行,看了楼主的切换到3.4.7才成功。

要回复问题请先登录注册