引入wifi任意功能,云打包,快速安心打包
- 发布:2023-07-09 17:31
- 更新:2023-09-26 12:23
- 阅读:610
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: win11
HBuilderX类型: 正式
HBuilderX版本号: 3.8.7
手机系统: Android
手机系统版本号: Android 9.0
手机厂商: 模拟器
手机机型: 无
页面类型: vue
vue版本: vue3
打包方式: 云端
项目创建方式: HBuilderX
操作步骤:
预期结果:
打包成功
打包成功
实际结果:
打包失败
打包失败
bug描述:
[HBuilder] 17:23:41.129 e: file://uni_modules/uni-wifi/utssdk/app-android/src/index.kt:217:37 Unresolved reference: push
[HBuilder] 17:23:41.129 e: file://uni_modules/uni-wifi/utssdk/app-android/src/index.kt:293:38 Unresolved reference: push
[HBuilder] 17:23:41.129 e: file://uni_modules/uni-wifi/utssdk/app-android/src/index.kt:296:53 Unresolved reference: push
[HBuilder] 17:23:41.129 e: file://uni_modules/uni-wifi/utssdk/app-android/src/index.kt:304:62 Unresolved reference: splice
[HBuilder] 17:23:41.129 e: file://uni_modules/uni-wifi/utssdk/app-android/src/index.kt:312:77 Unresolved reference: splice
[HBuilder] 17:23:41.129 e: file://uni_modules/uni-wifi/utssdk/app-android/src/index.kt:323:53 Unresolved reference: length
[HBuilder] 17:23:41.129
[HBuilder] 17:23:41.129 FAILURE: Build failed with an exception.
[HBuilder] 17:23:41.129
[HBuilder] 17:23:41.129 What went wrong:
[HBuilder] 17:23:41.129 Execution failed for task ':uni_modules:uni-wifi:compileReleaseKotlin'.
[HBuilder] 17:23:41.129 > A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
[HBuilder] 17:23:41.129 > Compilation error. See log for more details
[HBuilder] 17:23:41.129
[HBuilder] 17:23:41.129 Try:
[HBuilder] 17:23:41.129 > Run with --stacktrace option to get the stack trace.
[HBuilder] 17:23:41.129 > Run with --info or --debug option to get more log output.
[HBuilder] 17:23:41.129 > Run with --scan to get full insights.
5 个回复
1***@qq.com
有解决吗
sinsola
HBuilderX 版本升级一下
Neglo - 被逼无奈做前端
昨天晚上试了好多版本,3.7.11可以正常打包
4***@qq.com
我试了3.7.11还是不行,不知道怎么回事
2023-09-06 10:03
4***@qq.com
Error: Module build failed (from ./node_modules/@dcloudio/uni-cli-shared/lib/uts/uts-loader.js):
NonErrorEmittedError: (Emitted value instead of an instance of Error) 项目使用了uts插件,正在安装 uts Android 运行扩展...
at D:\project\v3\DELTRIX_InstallationAPP\node_modules\webpack\lib\NormalModule.js:313:13
at D:\project\v3\DELTRIX_InstallationAPP\node_modules\loader-runner\lib\LoaderRunner.js:367:11
at D:\project\v3\DELTRIX_InstallationAPP\node_modules\loader-runner\lib\LoaderRunner.js:233:18
at context.callback (D:\project\v3\DELTRIX_InstallationAPP\node_modules\loader-runner\lib\LoaderRunner.js:111:13)
请问你有出现这个问题吗
2023-09-06 10:05
Neglo
回复 4***@qq.com: 正在安装 uts Android 运行扩展,,安装这个插件看看
2023-09-06 17:11
4***@qq.com
回复 Neglo: 原项目死活安不上,我新建了个项目才安上,但是我跑原项目,还是报错。
23:09:38.868 error: Unresolved reference: UTSObject
23:09:38.872 at uni_modules/uni-wifi/utssdk/interface.uts:8:0
23:09:38.875 5 | success?: (res: UniWifiResult) => void;
23:09:38.880 6 | fail?: (res: UniWifiResult) => void;
23:09:38.880 7 | complete?: (res: UniWifiResult) => void;
23:09:38.884 | ^
23:09:38.890 8 | };
23:09:38.894 9 |
23:09:38.898 error: Unresolved reference: UTSObject
23:09:38.901 at uni_modules/uni-wifi/utssdk/interface.uts:22:0
23:09:38.907 19 | success?: (res: UniWifiResult) => void;
23:09:38.912 20 | fail?: (res: UniWifiResult) => void;
23:09:38.917 21 | complete?: (res: UniWifiResult) => void;
23:09:38.921 | ^
23:09:38.927 22 | }
23:09:38.928 23 |
23:09:38.932 error: Unresolved reference: UTSObject
23:09:38.933 at uni_modules/uni-wifi/utssdk/interface.uts:32:0
23:09:38.939 29 | success?: (res: UniWifiResult) => void
23:09:38.943 30 | fail?: (res: UniWifiResult) => void
23:09:38.947 31 | complete?: (res: UniWifiResult) => void
23:09:38.951 | ^
23:09:38.954 32 | }
23:09:38.958 33 |
23:09:38.962 error: Unresolved reference: JsonNotNull
23:09:38.968 at uni_modules/uni-wifi/utssdk/interface.uts:38:1
23:09:38.973 36 | */
23:09:38.973 37 | export type UniWifiInfo = {
23:09:38.976 38 | SSID: string;
23:09:38.980 | ^
23:09:38.985 39 | BSSID?: string;
23:09:38.989 40 | secure?: boolean;
我项目是vue-cli搭建的,不知道有没这方面的原因
2023-09-06 23:20
Neglo
回复 4***@qq.com: 这个就不清楚了。。没遇到过这个报错
2023-09-08 08:39
s***@foxmail.com
同问题,之前打包一直好好的,今天打包出现这个问题。
目前是准备升级到最新版本来尝试下,是否是因为本地开发工具版本过低,导致和云打包不一致出现库不对,编译出错问题。
使用的分别是 3.7.11、3.8.7两个版本的HBuilderX来测试
老版本是 3.6.4
3.7.11 打包成功,没有报错。
3.8.7 打包成功,没有报错。
应该就是开发工具版本过低出现的问题,编译过后,上传云打包的资源没法在新版本的云端打包上正常打包
Neglo - 被逼无奈做前端
今天又使用3.8.12试了一下,
1、云打自定义基座没问题了,不报错了,wifi部分功能正常使用
2、云打正式包也没问题了,但是安装APP后,wifi部分的功能不能使用,没有反应
uni-wifi插件版本是1.0.3(2023-04-07)
Neglo
uni-wifi升级到1.0.4(2023-07-26),正式包可以打包,但功能依然不可用;自定义基座都正常
2023-09-26 14:12
Neglo
hbuilderx升级到3.96,uni-wifi升级到1.0.6后,一切正常了
2023-11-21 09:16
Neglo
回复 Neglo: 草率了,自定义基座正常,打正式包后还是不能用,还得换回3.7.11
2023-11-24 11:32
Neglo
回复 Neglo: 3.7.11打包被谷歌拒了。今天无奈又换成3.96试试看,竟然可以用了,真TM神奇
2023-11-27 11:46