y***@aliyun.com
y***@aliyun.com
  • 发布:2024-07-26 15:13
  • 更新:2024-08-02 15:26
  • 阅读:251

Wine下的HBuilder打包apk失败

分类:HBuilderX

我的环境是manjaro 用的wine 9.8跑的HBuilder 4.24
千辛万苦,HBuilder能识别到模拟器了。

正当感觉看到胜利的属于光时,编译过不去了。

提示里面写的在哪里依赖包里面包的这个错误。于是我改改代码,让日志信息打印得全面一些。[我加了下图第57行]

报错信息全面一点了。

为了方便大家帮查问题。我把日志拷贝上来。求救求救!!!
[广告] 15:10:29.356 uni-cdn,帮你节省至少30%的 CDN 费用!详情
15:10:29.433 项目 eqm-app 开始编译
15:10:38.783 请注意运行模式下,因日志输出、sourcemap 以及未压缩源码等原因,性能和包体积,均不及发行模式。
15:10:38.783 编译器版本:4.24(uni-app x)
15:10:38.783 正在编译中...
15:10:51.733 uts插件[XF-zipUTS]不存在,请重新打包自定义基座
15:11:24.727 headers >> [
15:11:24.728 'Warning in D:\workspace\eqm-app\unpackage\cache\uts_standard_android\app-android\uts\uni_modules\Young-Sqlite\index.jar:uts/sdk/modules/YoungSqlite/SqliteManager$onUpgrade$2.class:',
15:11:24.728 'Type kotlin.jvm.internal.Lambda was not found, it is required for default or static interface methods desugaring of uts.sdk.modules.YoungSqlite.SqliteManager$onUpgrade$2',
15:11:24.728 'Warning in D:\workspace\eqm-app\unpackage\cache\uts_standard_android\app-android\uts\uni_modules\Young-Sqlite\index.jar:uts/sdk/modules/YoungSqlite/DelSqliteApiResult.class:',
15:11:24.729 'Type io.dcloud.uts.IUTSSourceMap was not found, it is required for default or static interface methods desugaring of uts.sdk.modules.YoungSqlite.DelSqliteApiResult',
15:11:24.729 'Warning in D:\workspace\eqm-app\unpackage\cache\uts_standard_android\app-android\uts\uni_modules\Young-Sqlite\index.jar:uts/sdk/modules/YoungSqlite/SqliteApiResult.class:',
15:11:24.729 'Type io.dcloud.uts.UTSObject was not found, it is required for default or static interface methods desugaring of uts.sdk.modules.YoungSqlite.SqliteApiResult',
15:11:24.729 'Warning in D:\workspace\eqm-app\unpackage\cache\uts_standard_android\app-android\uts\uni_modules\Young-Sqlite\index.jar:uts/sdk/modules/YoungSqlite/SqliteApiFailImpl.class:',
15:11:24.729 'Type io.dcloud.uniapp.UniError was not found, it is required for default or static interface methods desugaring of uts.sdk.modules.YoungSqlite.SqliteApiFailImpl',
15:11:24.729 'Warning in D:\workspace\eqm-app\unpackage\cache\uts_standard_android\app-android\uts\uni_modules\Young-Sqlite\index.jar:uts/sdk/modules/YoungSqlite/SqliteManager.class:',
15:11:24.729 'Type android.database.sqlite.SQLiteOpenHelper was not found, it is required for default or static interface methods desugaring of uts.sdk.modules.YoungSqlite.SqliteManager',
15:11:24.729 'Warning in D:\workspace\eqm-app\unpackage\cache\uts_standard_android\app-android\uts\uni_modules\Young-Sqlite\index.jar:uts/sdk/modules/YoungSqlite/SqliteManager$onUpgrade$2.class:',
15:11:24.729 'Type kotlin.jvm.functions.Function1 was not found, it is required for default or static interface methods desugaring of uts.sdk.modules.YoungSqlite.SqliteManager$onUpgrade$2',
15:11:24.729 'Warning in D:\workspace\eqm-app\unpackage\cache\uts_standard_android\app-android\uts\uni_modules\Young-Sqlite\index.jar:uts/sdk/modules/YoungSqlite/SqliteApiFail.class:',
15:11:24.729 'Type io.dcloud.uniapp.IUniError was not found, it is required for default or static interface methods desugaring of uts.sdk.modules.YoungSqlite.SqliteApiFail',
15:11:24.730 'Content-Length: 68'
15:11:24.730 ]
15:11:24.730 Error: Message header must separate key and value using :
15:11:24.730 at D:\Programs\HBuilderX\HBuilderX.4.24.2024072208\plugins\uniapp-runextension\node_modules\vscode-jsonrpc\lib\messageReader.js:58:23
15:11:24.730 at Array.forEach (<anonymous>)
15:11:24.731 at MessageBuffer.tryReadHeaders (D:\Programs\HBuilderX\HBuilderX.4.24.2024072208\plugins\uniapp-runextension\node_modules\vscode-jsonrpc\lib\messageReader.js:54:17)
15:11:24.731 at StreamMessageReader.onData (D:\Programs\HBuilderX\HBuilderX.4.24.2024072208\plugins\uniapp-runextension\node_modules\vscode-jsonrpc\lib\messageReader.js:158:43)
15:11:24.731 at Socket.<anonymous> (D:\Programs\HBuilderX\HBuilderX.4.24.2024072208\plugins\uniapp-runextension\node_modules\vscode-jsonrpc\lib\messageReader.js:149:18)
15:11:24.732 at Socket.emit (node:events:529:35)
15:11:24.732 at addChunk (node:internal/streams/readable:368:12)
15:11:24.732 at readableAddChunk (node:internal/streams/readable:341:9)
15:11:24.732 at Readable.push (node:internal/streams/readable:278:10)
15:11:24.732 at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)

2024-07-26 15:13 负责人:无 分享
已邀请:
y***@aliyun.com

y***@aliyun.com (作者)

18:05:44.232 当前工程9个页面,正在编译为android class,此过程耗时较长..
就是走到这一步的报错。

y***@aliyun.com

y***@aliyun.com (作者)

重新建项,第一类空项目。不会失败。第二类项目编译成android class 就过不去要报错。

y***@aliyun.com

y***@aliyun.com (作者)

重启电脑也不行。
但有的时候,不知道怎么又可以了。只是次数很有限。

y***@aliyun.com

y***@aliyun.com (作者)

怀疑过,是不是linux目录权限问题。我把项目的目录权限开到了777 。也是没解决。

y***@aliyun.com

y***@aliyun.com (作者)

这是HB对应的日志。里面没有明显的错误。但有一些WARN

y***@aliyun.com

y***@aliyun.com (作者)

项目代码用过webstom,然后用的hbuilderx,
不知道是哪个工具把我本地的依赖 uni_model,还有 node_moudles里的文件全改了。可能只是格式化。
我用git把这些不是我改的代码。都恢复了。总共有190+多个文件。
恢复完的那一刻,启动到android模拟器成功了(因为之前一直处于启动状态,虽然有报错。但我没关)。

启动代码不是最新的,我改了业务逻辑,没同步到app,我手动停止了本次启动,用新代码再启动(并且清除构建缓存),又处于失败中了。

y***@aliyun.com

y***@aliyun.com (作者)

我的开发电脑是 linux 的。
现在没法正常开发,只能盲写代码。
写好了推到 git ,然后同事帮我拉下来,看能不能正常运行。
!!!!!
希望官方早日解决帮我。

要回复问题请先登录注册