帝皇海英
帝皇海英
  • 发布:2026-07-13 12:36
  • 更新:2026-07-13 15:10
  • 阅读:116

【报Bug】5.08升级5.14 后 安卓编译失败

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

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

HBuilderX版本号: 5.14

手机系统: 全部

手机厂商: 华为

页面类型: vue

vue版本: vue3

打包方式: 云端

项目创建方式: CLI

CLI版本号: 3.0.0-alpha-5020120260710001

测试过的手机:

小米

操作步骤:

launch app --platform android

预期结果:

正常编译

实际结果:

只显示编译失败,无报错

bug描述:

升级hbuilder 版本到从5.08---->5.14 后运行到浏览器正常,运行到安卓 一直编译失败,制作wgt也是编译失败,云打包;没有报错详细信息; 切回5.08版本一切正常;之后又尝试了5.15、5.21 都不行,只有5.08及以前的版本可以

2026-07-13 12:36 负责人:无 分享
已邀请:
Ask小助手

Ask小助手

欢迎到专业群( uni-app 官方技术交流群 1 ) 咨询,群中有相关专业的管理员和群友。

好的,收到你的 bug 反馈。作为 DCloud 官方人员,我对这个反馈进行如下评审和分析:

1. 反馈质量评审

这个 bug 反馈的核心信息比较清晰,但存在几个关键信息的缺失,导致我们官方人员无法直接定位问题。

  • BUG 标题与描述:标题“5.08升级5.14 后 安卓编译失败”非常明确,描述中指出了“运行到浏览器正常”、“制作wgt和云打包均失败”、“只显示编译失败,无报错”以及“切回5.08正常”。这些信息我们能够看懂,并初步判断是 HBuilderX 版本升级引发的编译兼容性问题。
  • 代码示例:缺失。由于没有提供任何代码片段或可复现的工程示例,我们无法判断是否是项目中某些特定语法、依赖或原生插件在新版本中不再兼容。
  • 复现步骤:仅提供了 launch app --platform android,过于简略。我们无法据此成功复现,强烈建议用户补充最简可复现工程
  • 预期结果:“正常编译”,合理。
  • 实际结果:“只显示编译失败,无报错”,对于编译失败的情况,这属于异常现象,需要排查为何没有输出详细日志。
  • 分类信息:基本完整,包含了操作系统(Windows 19045.5011)、HBuilderX 版本(Alpha 5.14)、手机平台(全部/华为)、Vue 版本(Vue3)。但缺少项目创建方式(CLI/HBuilderX)、打包方式(本地/云端)以及是否包含原生模块或 uts 插件等信息。

评审结论:反馈有效,但信息不足以直接排查根因。需要用户补充复现工程及更多环境细节。


2. 问题分析与排查

根据反馈内容,该问题成立的可能性很高,属于版本升级引发的编译异常。结合知识库和历史排查经验,可能的原因如下:

  • 编译缓存错乱:在 HBuilderX 大版本升级(尤其是涉及底层依赖调整)后,本地的编译缓存或 unpackage 目录可能会与新版本编译器冲突,导致编译失败且未输出有效错误日志。
  • 第三方依赖或原生插件不兼容:如果项目中使用了较老的原生插件、uts 插件或特殊的 npm 包,新版本 HBuilderX 的编译环境(如 Gradle、AndroidX 适配库等升级)可能不再兼容。根据官方版本升级注意事项,HBuilderX 在升级时会调整 androidx、gradle 等底层版本,不适配的插件会导致编译失败。
  • wgt 版本差异问题:你提到制作 wgt 也失败。根据官方版本说明,wgt 的编译版本需与运行时匹配,但此处主要表现为编译期失败,更大概率是项目本身的依赖问题。

3. 解决方案与建议

建议你按以下步骤进行排查和修复:

  1. 清理本地缓存并重新编译
    在 HBuilderX 中,关闭项目,手动删除项目根目录下的 unpackage 文件夹和 node_modules(如果存在)。然后重新打开项目,运行到安卓,在设备选择对话框中勾选“清空缓存”后重新编译。

  2. 获取隐藏的报错日志
    虽然控制台提示“无报错”,但你可以通过菜单栏的【帮助】->【查看运行日志】,在打开的日志文件中搜索 errorfailed 关键字,寻找是否有底层抛出的异常堆栈。如果有,请将具体日志补充到反馈中。

  3. 排查原生插件与依赖
    如果你的项目包含 uni_modules 或原生插件,尝试暂时移除或禁用它们,看是否能编译通过。如果编译成功,说明是某个插件未适配新版本,需要联系插件作者升级。

  4. 提供最简复现工程
    如果以上步骤均无效,请新建一个空白的 Vue3 项目,看是否同样无法编译到安卓。如果新项目正常,请逐步排查原项目中的页面和依赖,剥离出一个最简的可复现工程,并通过 issues 系统提交给官方。没有复现工程,我们很难针对“无报错”的编译失败进行深入排查。

内容为 AI 生成,仅供参考
帝皇海英

帝皇海英 (作者)

2026-07-13 11:46:34.555 [INFO:] [Thread] The object move to thread occur in  (FileStatusLoader::processNext)  
2026-07-13 11:46:34.921 [INFO:] [PluginHost] 插件hbuilderx-language-services激活成功。  
2026-07-13 11:46:34.953 [INFO:] [PluginHost] 插件chrome-base激活成功。  
2026-07-13 11:46:34.954 [INFO:] [PluginHost] 插件launcher激活成功。  
2026-07-13 11:46:34.954 [INFO:] [PluginHost] 插件uts-debug-ios激活成功。  
2026-07-13 11:46:34.955 [INFO:] [PluginHost] 插件uniappx-vapor-launcher激活成功。  
2026-07-13 11:46:34.955 [INFO:] [PluginHost] 插件uni_modules激活成功。  
2026-07-13 11:46:34.956 [INFO:] [PluginHost] 插件unicloud_proxy激活成功。  
2026-07-13 11:46:34.956 [INFO:] [PluginHost] 插件uts-development-ios激活成功。  
2026-07-13 11:46:34.957 [INFO:] [PluginHost] 插件hbuilderx-cli激活成功。  
2026-07-13 11:46:34.958 [INFO:] [PluginHost] 插件uts-development-android激活成功。  
2026-07-13 11:46:34.958 [INFO:] [PluginHost] 插件uts-android-debug激活成功。  
2026-07-13 11:46:34.961 [INFO:] [PluginHost] 插件format激活成功。  
2026-07-13 11:46:34.962 [INFO:] [PluginHost] 插件uts-development-harmony激活成功。  
2026-07-13 11:46:34.963 [INFO:] [PluginHost] 插件unicloud激活成功。  
2026-07-13 11:46:34.963 [INFO:] [PluginHost] 插件builtincef3browser激活成功。  
2026-07-13 11:46:34.964 [INFO:] [PluginHost] 插件nodeserver激活成功。  
2026-07-13 11:46:34.965 [INFO:] [PluginHost] 插件uniapp-runextension激活成功。  
2026-07-13 11:46:34.965 [INFO:] [PluginHost] 插件uniappx-launcher激活成功。  
2026-07-13 11:46:34.966 [INFO:] [PluginHost] 插件im-notifier激活成功。  
2026-07-13 11:46:34.966 [INFO:] [PluginHost] 插件app-safe-pack激活成功。  
2026-07-13 11:46:34.967 [INFO:] [PluginHost] 插件extension-development激活成功。  
2026-07-13 11:46:34.967 [INFO:] [PluginHost] 插件copilot-for-hbuilder激活成功。  
2026-07-13 11:46:34.968 [INFO:] [PluginHost] 插件uts-development-proxy激活成功。  
2026-07-13 11:46:34.968 [INFO:] [PluginHost] 插件SVN激活成功。  
2026-07-13 11:46:34.969 [INFO:] [PluginHost] 插件hbuilderx-issue-reporter激活成功。  
2026-07-13 11:46:34.970 [INFO:] [Thread] The object move to thread occur in  (JobManager::runInStandaloneThread<T>)  
2026-07-13 11:46:34.986 [INFO:] [Thread] The object move to thread occur in  (JobManager::runInStandaloneThread<T>)  
2026-07-13 11:46:34.987 [INFO:] [Thread] The object move to thread occur in  (JobManager::runInStandaloneThread<T>)  
2026-07-13 11:46:35.058 [INFO:] Execute command: "setContext"  
2026-07-13 11:46:35.417 [INFO:] [Thread] The object move to thread occur in  (JobManager::runInStandaloneThread<T>)  
2026-07-13 11:46:35.517 [INFO:] [Thread] The object move to thread occur in  (FileStatusLoader::processNext)  
2026-07-13 11:46:35.721 [INFO:] Local Mac:  "00:E0:20:58:36:22"  
2026-07-13 11:46:36.209 [INFO:] [Thread] The object move to thread occur in  (FileStatusLoader::processNext)  
2026-07-13 11:46:36.815 [INFO:] [Thread] The object move to thread occur in  (FileStatusLoader::processNext)  
2026-07-13 11:46:37.413 [INFO:] [Thread] The object move to thread occur in  (FileStatusLoader::processNext)  
2026-07-13 11:46:38.515 [INFO:] [Thread] The object move to thread occur in  (FileStatusLoader::processNext)  
2026-07-13 11:46:39.625 [INFO:] [Thread] The object move to thread occur in  (FileStatusLoader::processNext)  
2026-07-13 11:46:40.234 [INFO:] [Thread] The object move to thread occur in  (FileStatusLoader::processNext)  
2026-07-13 11:46:41.155 [WARNING:] QObject::killTimer: Timers cannot be stopped from another thread  
2026-07-13 11:46:41.155 [WARNING:] QObject::startTimer: Timers cannot be started from another thread  
2026-07-13 11:46:44.761 [INFO:] [Thread] The object move to thread occur in  (FileStatusLoader::processNext)  
2026-07-13 11:46:45.783 [INFO:] [Thread] The object move to thread occur in  (FileStatusLoader::processNext)  
2026-07-13 11:46:45.812 [WARNING:] [PluginHost] copyFileByExt [Error: ENOENT: no such file or directory, lstat 'E:\超链未来\wlwq-apps\apps\enterprise-app\unpackage\cache\uts_custom_android.refreshing\.tmp\assets\HXDependencies'] {  
  errno: -4058,  
  code: 'ENOENT',  
  syscall: 'lstat',  
  path: 'E:\\超链未来\\wlwq-apps\\apps\\enterprise-app\\unpackage\\cache\\uts_custom_android.refreshing\\.tmp\\assets\\HXDependencies'  
}  

2026-07-13 11:46:45.825 [WARNING:] [PluginHost] [LanguageServerIndex] [Error - 11:46:45] [IndexServer] onDidChangeWatchedFiles rootFolders is empty, uri: file:///e%3A/%E8%B6%85%E9%93%BE%E6%9C%AA%E6%9D%A5/wlwq-apps/apps/enterprise-app    at Logger.getStackTrace (D:\developSoftware\HBuilderX.5.21.2026071110-alpha\plugins\hbuilderx-language-services\indexservice\out\server\logger.js:1:1082)  

2026-07-13 11:46:46.125 [WARNING:] [PluginHost] refreshCustomBaseCache Error: custom base cache is empty: E:\超链未来\wlwq-apps\apps\enterprise-app\unpackage\cache\uts_custom_android.refreshing  
    at Ce (D:\developSoftware\HBuilderX.5.21.2026071110-alpha\plugins\launcher\out\main.js:100:341417)  
    at async D:\developSoftware\HBuilderX.5.21.2026071110-alpha\plugins\launcher\out\main.js:100:351862  
    at async Proxy.Te (D:\developSoftware\HBuilderX.5.21.2026071110-alpha\plugins\launcher\out\main.js:100:351527)  
    at async t.openDeviceListByPlatform (D:\developSoftware\HBuilderX.5.21.2026071110-alpha\plugins\uniapp-extension\out\index.js:1:659441)  
    at async t.menuRun (D:\developSoftware\HBuilderX.5.21.2026071110-alpha\plugins\uniapp-extension\out\index.js:12:283719)  
    at async D:\developSoftware\HBuilderX.5.21.2026071110-alpha\plugins\uniapp-extension\out\index.js:12:53444  

2026-07-13 11:46:46.180 [INFO:] Execute command: "setContext"  
2026-07-13 11:46:46.180 [INFO:] Execute command: "setContext"  
2026-07-13 11:46:46.181 [INFO:] Execute command: "setContext"  
2026-07-13 11:46:46.225 [WARNING:] [PluginHost] verifyPlugin=>launcher-tools pluginsVer=>1.0.3.2026052917,peerPluginsVer=>1.0.3.2026052917  

2026-07-13 11:46:46.398 [INFO:] [Thread] The object move to thread occur in  (FileStatusLoader::processNext)  
2026-07-13 11:46:47.014 [INFO:] [Thread] The object move to thread occur in  (FileStatusLoader::processNext)  
2026-07-13 11:46:47.610 [INFO:] [Thread] The object move to thread occur in  (FileStatusLoader::processNext)  
2026-07-13 11:46:48.206 [INFO:] [Thread] The object move to thread occur in  (FileStatusLoader::processNext)  
2026-07-13 11:46:49.649 [INFO:] [Thread] The object move to thread occur in  (FileStatusLoader::processNext)  
2026-07-13 11:46:50.262 [INFO:] [Thread] The object move to thread occur in  (FileStatusLoader::processNext)  
2026-07-13 11:46:50.951 [INFO:] [Thread] The object move to thread occur in  (FileStatusLoader::processNext)  
2026-07-13 11:46:51.558 [INFO:] [Thread] The object move to thread occur in  (FileStatusLoader::processNext)  
2026-07-13 11:46:52.158 [INFO:] [Thread] The object move to thread occur in  (FileStatusLoader::processNext)  
2026-07-13 11:46:52.561 [WARNING:] [PluginHost] [LanguageServerIndex] [Error - 11:46:52] [Indexer] ContextLineTextIsLong! FilePath: e:/超链未来/wlwq-apps/apps/enterprise-app/uni_modules/qiun-data-charts/components/qiun-error/qiun-error.vue.0.css    at Logger.getStackTrace (D:\developSoftware\HBuilderX.5.21.2026071110-alpha\plugins\hbuilderx-language-services\indexservice\out\server\logger.js:1:1082)  

2026-07-13 11:46:52.864 [INFO:] [Thread] The object move to thread occur in  (FileStatusLoader::processNext)  
2026-07-13 11:46:53.478 [INFO:] [Thread] The object move to thread occur in  (FileStatusLoader::processNext)  
2026-07-13 11:47:11.961 [INFO:] [Thread] The object move to thread occur in  (FileStatusLoader::processNext)  
2026-07-13 11:47:13.510 [INFO:] [Thread] The object move to thread occur in  (FileStatusLoader::processNext)  
2026-07-13 11:47:33.553 [INFO:] [Thread] The object move to thread occur in  (FileStatusLoader::processNext)  
2026-07-13 11:47:36.890 [INFO:] [Thread] The object move to thread occur in  (FileStatusLoader::processNext)  
2026-07-13 11:47:38.330 [INFO:] [Thread] The object move to thread occur in  (FileStatusLoader::processNext)  
2026-07-13 11:47:42.005 [WARNING:] WorkspaceModel::index( 17 , 0 , "{783c8a10-5282-4210-b8f6-f42f3c6959aa}" ) return empty index.  
2026-07-13 11:47:42.006 [WARNING:] WorkspaceModel::index( 17 , 0 , "{783c8a10-5282-4210-b8f6-f42f3c6959aa}" ) return empty index.  
2026-07-13 11:47:42.008 [WARNING:] WorkspaceModel::index( 17 , 0 , "{783c8a10-5282-4210-b8f6-f42f3c6959aa}" ) return empty index.  
2026-07-13 11:47:42.009 [WARNING:] WorkspaceModel::index( 17 , 0 , "{783c8a10-5282-4210-b8f6-f42f3c6959aa}" ) return empty index.  
2026-07-13 11:47:42.009 [WARNING:] WorkspaceModel::index( 17 , 0 , "{783c8a10-5282-4210-b8f6-f42f3c6959aa}" ) return empty index.  
2026-07-13 11:47:42.009 [WARNING:] WorkspaceModel::index( 17 , 0 , "{783c8a10-5282-4210-b8f6-f42f3c6959aa}" ) return empty index.  
2026-07-13 11:47:42.108 [WARNING:] QObject::killTimer: Timers cannot be stopped from another thread  
2026-07-13 11:47:42.109 [WARNING:] QObject::startTimer: Timers cannot be started from another thread  
2026-07-13 11:47:44.443 [WARNING:] [PluginHost] [LanguageServerIndex] [Error - 11:47:44] [IndexServer] onDidChangeWatchedFiles rootFolders is empty, uri: file:///e%3A/%E8%B6%85%E9%93%BE%E6%9C%AA%E6%9D%A5/wlwq-apps/apps/enterprise-app    at Logger.getStackTrace (D:\developSoftware\HBuilderX.5.21.2026071110-alpha\plugins\hbuilderx-language-services\indexservice\out\server\logger.js:1:1082)  

2026-07-13 11:47:51.812 [WARNING:] [PluginHost] [LanguageServerIndex] [Error - 11:47:51] [Indexer] ContextLineTextIsLong! FilePath: e:/超链未来/wlwq-apps/apps/enterprise-app/uni_modules/qiun-data-charts/components/qiun-error/qiun-error.vue.0.css    at Logger.getStackTrace (D:\developSoftware\HBuilderX.5.21.2026071110-alpha\plugins\hbuilderx-language-services\indexservice\out\server\logger.js:1:1082)  

2026-07-13 11:52:35.275 [INFO:] [Thread] The object move to thread occur in  (FileStatusLoader::processNext)  
2026-07-13 11:52:35.885 [INFO:] [Thread] The object move to thread occur in  (FileStatusLoader::processNext)  
2026-07-13 11:52:36.484 [INFO:] [Thread] The object move to thread occur in  (FileStatusLoader::processNext)  
2026-07-13 11:52:37.980 [INFO:] [Thread] The object move to thread occur in  (FileStatusLoader::processNext)  
2026-07-13 11:52:38.591 [INFO:] [Thread] The object move to thread occur in  (FileStatusLoader::processNext)  
2026-07-13 11:52:39.187 [INFO:] [Thread] The object move to thread occur in  (FileStatusLoader::processNext)  
2026-07-13 11:56:36.433 [WARNING:] server json is error:  "illegal value"  for  "https://log.liuyingyong.cn/ide"  
2026-07-13 12:32:12.076 [INFO:] [Thread] The object move to thread occur in  (FileStatusLoader::processNext)  
2026-07-13 12:32:12.683 [INFO:] [Thread] The object move to thread occur in  (FileStatusLoader::processNext)  
2026-07-13 12:32:13.264 [INFO:] [Thread] The object move to thread occur in  (FileStatusLoader::processNext)  
2026-07-13 12:32:14.407 [INFO:] [Thread] The object move to thread occur in  (FileStatusLoader::processNext)  
2026-07-13 12:32:15.007 [INFO:] [Thread] The object move to thread occur in  (FileStatusLoader::processNext)  
2026-07-13 12:32:15.606 [INFO:] [Thread] The object move to thread occur in  (FileStatusLoader::processNext)  
2026-07-13 13:39:30.121 [INFO:] Upgrade::isFallbackedVersion ?  
2026-07-13 13:39:30.122 [INFO:] (checkupdate comparepluginversion)  "hbuilder.root"  in  "D:/developSoftware/HBuilderX.5.21.2026071110-alpha/update/backup/root/hbuilder.root"  
2026-07-13 13:39:30.134 [INFO:] (checkupdate comparepluginversion about) compare ( "5.21.2026071110-alpha" ) about version( 5.14.2026062614-alpha ) in about package.json  
2026-07-13 13:39:30.134 [INFO:] Upgrade::isFallbackedVersion return false  
2026-07-13 13:39:30.135 [INFO:] Upgrade::canFallback::check( "D:/developSoftware/HBuilderX.5.21.2026071110-alpha/update/backup/root/hbuilder.root" ) exits?  
2026-07-13 13:39:30.135 [INFO:] Upgrade::canFallback::check( "D:/developSoftware/HBuilderX.5.21.2026071110-alpha/update/.data" ) exits?  
2026-07-13 13:39:30.136 [INFO:] Upgrade::canFallback::check( "D:/developSoftware/HBuilderX.5.21.2026071110-alpha/update/.data" ) exits return true  
2026-07-13 13:39:35.981 [INFO:] [Thread] The object move to thread occur in  (DocumentProvider)  
2026-07-13 13:39:36.227 [WARNING:] [PluginHost] error: missing required argument 'files'  

要回复问题请先登录注册