正常云打包,安卓无问题,ios有问题
- 发布:2026-08-17 12:31
- 更新:2026-08-19 12:32
- 阅读:87
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: 版本 Windows 10 企业版 LTSC 版本号 21H2 安装日期 2025/7/18 OS 内部版本 19044.7548
手机系统: iOS
手机系统版本号: iOS 26
手机厂商: 苹果
手机机型: 111
页面类型: vue
vue版本: vue3
打包方式: 云端
项目创建方式: CLI
CLI版本号: 3.0.0-5020420260813003
操作步骤:
预期结果:
正常打包
正常打包
实际结果:
打包失败
打包失败
bug描述:
错误日志
https://app.liuyingyong.cn/build/errorLog/2067b0f0-99e5-11f1-94d7-bde524ca565b
Appid: UNI37F2F7E
HBuilderX版本号:5.24
uniapp-cli版本: 5.24
uniapp 编译器版本: 5.24
云打包服务器SDK版本: 5.24
错误解决方案
错误描述: uts插件编译失败
解决方案: 请根据编译错误修改插件相关代码后重新提交打包。或联系插件作者解决。
######################
Error code = -5000
Error message:
UTS plugin uni_modules/android-keeplive, uni_modules/hens-sse compile error!
uni_modules/android-keeplive
[PackagePath]/wgtRoot/UNI37F2F7E/uni_modules/android-keeplive/utssdk/app-ios/src/index.swift:14:13: error: cannot find 'KeepHelper' in scope
[PackagePath]/wgtRoot/UNI37F2F7E/uni_modules/android-keeplive/utssdk/app-ios/src/index.swift:55:21: error: cannot find 'KeepHelper' in scope
[PackagePath]/wgtRoot/UNI37F2F7E/uni_modules/android-keeplive/utssdk/app-ios/src/index.swift:64:21: error: cannot find 'KeepHelper' in scope
[PackagePath]/wgtRoot/UNI37F2F7E/uni_modules/android-keeplive/utssdk/app-ios/src/index.swift:65:9: error: cannot find 'KeepHelper' in scope
[PackagePath]/wgtRoot/UNI37F2F7E/uni_modules/android-keeplive/utssdk/app-ios/src/index.swift:121:9: error: cannot find 'KeepHelper' in scope
[PackagePath]/wgtRoot/UNI37F2F7E/uni_modules/android-keeplive/utssdk/app-ios/src/index.swift:122:9: error: cannot find 'KeepHelper' in scope
[PackagePath]/wgtRoot/UNI37F2F7E/uni_modules/android-keeplive/utssdk/app-ios/src/index.swift:125:9: error: cannot find 'KeepHelper' in scope
[PackagePath]/wgtRoot/UNI37F2F7E/uni_modules/android-keeplive/utssdk/app-ios/src/index.swift:135:9: error: cannot find 'KeepHelper' in scope
[PackagePath]/wgtRoot/UNI37F2F7E/uni_modules/android-keeplive/utssdk/app-ios/src/index.swift:136:9: error: cannot find 'KeepHelper' in scope
[PackagePath]/wgtRoot/UNI37F2F7E/uni_modules/android-keeplive/utssdk/app-ios/src/index.swift:140:16: error: cannot find 'KeepHelper' in scope
[PackagePath]/wgtRoot/UNI37F2F7E/uni_modules/android-keeplive/utssdk/app-ios/src/index.swift:158:13: error: cannot find 'KeepHelper' in scope
[PackagePath]/wgtRoot/UNI37F2F7E/uni_modules/android-keeplive/utssdk/app-ios/src/index.swift:282:17: error: cannot find 'KeepHelper' in scope
[PackagePath]/wgtRoot/UNI37F2F7E/uni_modules/android-keeplive/utssdk/app-ios/src/index.swift:291:16: error: cannot find 'KeepHelper' in scope
[PackagePath]/wgtRoot/UNI37F2F7E/uni_modules/android-keeplive/utssdk/app-ios/src/index.swift:336:9: error: cannot find 'KeepHelper' in scope
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from [SourcePath]/libs/UniSDK/BaseUniMP/DCUniBase.framework/Headers/DCUniBase.h:31:
| `- warning: 'UILocalNotification' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNNotificationRequest
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
STDERR ERROR:
BUILD FAILED The following build commands failed:
SwiftCompile normal arm64 [PackagePath]/wgtRoot/UNI37F2F7E/uni_modules/android-keeplive/utssdk/app-ios/src/index.swift (in target 'unimoduleAndroidKeeplive' from project 'UTS')
SwiftCompile normal arm64 Compiling\ index.swift [PackagePath]/wgtRoot/UNI37F2F7E/uni_modules/android-keeplive/utssdk/app-ios/src/index.swift (in target 'unimoduleAndroidKeeplive' from project 'UTS')
(2 failures)
uni_modules/hens-sse
[PackagePath]/wgtRoot/UNI37F2F7E/uni_modules/hens-sse/utssdk/app-ios/src/index.swift:748:1: error: cannot find 'SSEStreamManager' in scope
[PackagePath]/wgtRoot/UNI37F2F7E/uni_modules/hens-sse/utssdk/app-ios/src/index.swift:762:15: error: cannot find 'SSEStreamManager' in scope
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from [SourcePath]/libs/UniSDK/BaseUniMP/DCUniBase.framework/Headers/DCUniBase.h:31:
| `- warning: 'UILocalNotification' is deprecated: first deprecated in iOS 10.0 - Use UserNotifications Framework's UNNotificationRequest
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
| `- note: in file included from <module-includes>:1:
STDERR ERROR:
BUILD FAILED The following build commands failed:
SwiftCompile normal arm64 [PackagePath]/wgtRoot/UNI37F2F7E/uni_modules/hens-sse/utssdk/app-ios/src/index.swift (in target 'unimoduleHensSse' from project 'UTS')
SwiftEmitModule normal arm64 Emitting\ module\ for\ unimoduleHensSse (in target 'unimoduleHensSse' from project 'UTS')
(2 failures)
用的是打自定义基座,想试试新的插件的,安卓目前无任何问题,ios打包失败
这个问题是我的付费插件都打包出问题,同时的mac电脑也是同样报错,之前是5,4x版本,上次打包出同样问题,然后升级5.15对应的cli解决了,这次又出现同样的问题,然后升级到5.24还是不能解决,以前项目没有付费插件一直没问题,现在用了付费插件每次打包出问题。现在包大,每次还收费,希望帮忙看看是哪里出的问题。
3 个回复
Ask小助手
感谢您的反馈。针对您提交的 Bug,以下是基于 DCloud 官方视角的评审与分析:
1. Bug 反馈内容完整性评审
android-keeplive和hens-sse),仅靠打包日志无法判断插件内部的具体实现逻辑。2. Bug 是否成立分析
根据您提供的错误日志,该 Bug 现象属于 UTS 插件在 iOS 平台的编译失败,具体表现为 Swift 编译阶段找不到特定类的定义:
uni_modules/android-keeplive插件报错:error: cannot find 'KeepHelper' in scope该错误表明插件在 iOS 端的
index.swift文件中调用了KeepHelper类,但编译器在当前作用域内找不到该类的声明。这通常是因为插件内部缺少对应的 Swift 类定义,或者相关的依赖文件未正确包含在 iOS 编译路径中。uni_modules/hens-sse插件报错:error: cannot find 'SSEStreamManager' in scope同理,该错误说明
SSEStreamManager类在 iOS 端的编译上下文中未定义。参考 ISSUE 系统 中的类似案例,当 UTS 插件在 iOS 端提示
cannot find xxx in scope或cannot find Swift declaration for this class时,通常是由于插件本身在 iOS 平台的实现代码缺失或依赖配置不完整导致的。结论与建议
该报错属于 UTS 插件编译错误,并非 uni-app x 编译器或云打包服务的基础 Bug。安卓端正常是因为这些插件在安卓端有对应的 Kotlin/Java 实现且依赖完整,而 iOS 端的 Swift 代码存在缺失。
解决方案:
请根据编译错误提示,检查
android-keeplive和hens-sse这两个 UTS 插件在utssdk/app-ios/src/目录下的代码:KeepHelper和SSEStreamManager相关的 Swift 源文件是否存在。建议您直接联系相关插件作者获取支持,或在插件基础上补充缺失的 iOS 原生实现代码后重新提交打包。
DCloud_App_Array
这个报错就是uts插件android-keeplive和hens-sse中的实现代码编译的错误。
请联系插件作者根据错误信息排查,也可以在macos系统在本地真机运行来确保uts插件编译正常。
hughhuxiaojun (作者)
之前一直好好的,上个版本的cli 5.15也是正常的,现在5.15和5.24都不行了,没有变更。我其实是有3个付费插件,3个插件报错一样,上面报错是只打包2个测试问题的,我用老的分支运行同样问题。我在社区发现有类似问题,是不是和下面的是同样的问题
https://ask.dcloud.net.cn/question/205380
https://ask.dcloud.net.cn/question/205374
https://ask.dcloud.net.cn/question/220773
2026-08-19 12:30
hughhuxiaojun (作者)
回复 hughhuxiaojun: 我打2个包测试是因为包大每次都收费,删了一些代码和插件最小打包测试的,这几天光测试这个问题就花了不少。所以来社区寻求解决方案
2026-08-19 12:34
hughhuxiaojun (作者) - 1
是不是同样问题
要回复问题请先登录或注册
公告
更多>相关问题