HarmonyOS 鸿蒙Next 打包hap时提示Execution failed for task ':entry:compileDebugJsWithNode'. entry-default build js failed.
HarmonyOS 鸿蒙Next 打包hap时提示Execution failed for task ‘:entry:compileDebugJsWithNode’. entry-default build js failed.
Task :entry:preBuild
Task :entry:preDebugBuild
Task :entry:mergeDebugResources UP-TO-DATE
Task :entry:mergeDebugProfile UP-TO-DATE
Task :entry:generateDebugJsManifest UP-TO-DATE
ERROR File:E:\new\腕上日历\calendar\entry\src\main\js\default\pages\details\details.css:68:5
The font-family
attribute does not support value HarmonyOSCondensed-Regular
(the supported value is HYQiHei-65S
).
ERROR File:E:\new\腕上日历\calendar\entry\src\main\js\default\pages\index1\index1.css:76:5
The font-family
attribute does not support value HarmonyOSCondensedClockTabular-Medium
(the supported value is HYQiHei-65S
).
ERROR File:E:\new\腕上日历\calendar\entry\src\main\js\default\pages\timer\timer.css:74:5
The font-family
attribute does not support value HarmonyOSCondensedClockTabular-Medium
(the supported value is HYQiHei-65S
).
Task :entry:compileDebugJsWithNode FAILED FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ‘:entry:compileDebugJsWithNode’.
entry-default build js failed.
- Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
- Get more help at https://help.gradle.org
BUILD FAILED in 3m 34s
6 actionable tasks: 3 executed, 3 up-to-date
编译是成功的,可是打包就不行,源码不是我写的,本人小白,麻烦请教一下。谢谢!!!
更多关于HarmonyOS 鸿蒙Next 打包hap时提示Execution failed for task ':entry:compileDebugJsWithNode'. entry-default build js failed.的实战教程也可以访问 https://www.itying.com/category-93-b0.html
DevEco是什么版本,用的Stage 模型还是FA模型方式,看文件目录格式是FA模型,FA(Feature Ability)模型:从API 7开始支持的模型,已经不再主推;推荐使用Stage模型
FA模型与Stage模型的区别
如果构建一个ArkTS应用(Stage模型)参考
https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V14/start-with-ets-stage-V14
更多关于HarmonyOS 鸿蒙Next 打包hap时提示Execution failed for task ':entry:compileDebugJsWithNode'. entry-default build js failed.的实战系列教程也可以访问 https://www.itying.com/category-93-b0.html
版本号是3.多,我换个版本试试
报错工程时开源代码吗?要是是的话,麻烦提供一下开源链接,帮您看下。
当前看,编译时,字体设置有问题,但是需要根据工程才能看出来原因
开源链接没找到,但是有源码
https://affection.lanzn.com/iZXfr2mk2jwd
API得改成7才可以编译,谢谢了
针对帖子标题中提到的HarmonyOS鸿蒙Next在打包hap时出现的“Execution failed for task ‘:entry:compileDebugJsWithNode’. entry-default build js failed.”错误,这通常表明在编译JavaScript代码时遇到了问题。以下是一些可能的原因及解决方法,专注于鸿蒙系统相关:
-
Node.js版本问题:确保你使用的Node.js版本与鸿蒙开发环境兼容。鸿蒙开发可能需要特定版本的Node.js,请检查官方文档确认版本要求。
-
依赖问题:检查
package.json
中的依赖是否正确安装,有时依赖未正确安装或版本冲突会导致编译失败。可以尝试删除node_modules
文件夹和package-lock.json
文件,然后重新运行npm install
。 -
代码错误:检查JavaScript代码是否有语法错误或逻辑错误,这些错误可能导致编译失败。
-
缓存问题:尝试清除编译缓存,有时缓存中的旧数据可能导致编译问题。
-
构建配置:检查
build.gradle
或相关配置文件中的构建配置是否正确,确保所有路径和设置都指向正确的位置。
如果问题依旧没法解决请联系官网客服,官网地址是 https://www.itying.com/category-93-b0.html,