HarmonyOS 鸿蒙Next 点击previewer 报错

发布于 1周前 作者 songsunli 来自 鸿蒙OS

HarmonyOS 鸿蒙Next 点击previewer 报错
``` ERROR: SyntaxError: Unexpected string in JSON at position 399610 at JSON.parse (<anonymous>) at ModulePreviewMode.updateCachedSourceMaps (D:\WORK\tools\devecostudio-windows-5.0.3.300\devecostudio-windows-5.0.3.300\deveco-studio-5.0.3.300.win\deveco-studio\sdk\HarmonyOS-NEXT-DB1\openharmony\ets\build-tools\ets-loader\lib\fast_build\ark_compiler\module\module_mode.js:1:8806) at ModulePreviewMode.buildModuleSourceMapInfo (D:\WORK\tools\devecostudio-windows-5.0.3.300\devecostudio-windows-5.0.3.300\deveco-studio-5.0.3.300.win\deveco-studio\sdk\HarmonyOS-NEXT-DB1\openharmony\ets\build-tools\ets-loader\lib\fast_build\ark_compiler\module\module_mode.js:1:10009) at ModulePreviewMode.generateAbc (D:\WORK\tools\devecostudio-windows-5.0.3.300\devecostudio-windows-5.0.3.300\deveco-studio-5.0.3.300.win\deveco-studio\sdk\HarmonyOS-NEXT-DB1\openharmony\ets\build-tools\ets-loader\lib\fast_build\ark_compiler\module\module_preview_mode.js:1:319) at generateAbc (D:\WORK\tools\devecostudio-windows-5.0.3.300\devecostudio-windows-5.0.3.300\deveco-studio-5.0.3.300.win\deveco-studio\sdk\HarmonyOS-NEXT-DB1\openharmony\ets\build-tools\ets-loader\lib\fast_build\ark_compiler\generate_module_abc.js:1:1335) at Object.generateModuleAbc (D:\WORK\tools\devecostudio-windows-5.0.3.300\devecostudio-windows-5.0.3.300\deveco-studio-5.0.3.300.win\deveco-studio\sdk\HarmonyOS-NEXT-DB1\openharmony\ets\build-tools\ets-loader\lib\fast_build\ark_compiler\generate_module_abc.js:1:846) at async Promise.all (index 5) at async PluginDriver.hookParallel (D:\WORK\tools\devecostudio-windows-5.0.3.300\devecostudio-windows-5.0.3.300\deveco-studio-5.0.3.300.win\deveco-studio\tools\hvigor\hvigor-ohos-plugin\node_modules@ohos\hvigor-arkts-base\node_modules\rollup\dist\shared\rollup.js:24481:9) at async D:\WORK\tools\devecostudio-windows-5.0.3.300\devecostudio-windows-5.0.3.300\deveco-studio-5.0.3.300.win\deveco-studio\tools\hvigor\hvigor-ohos-plugin\node_modules@ohos\hvigor-arkts-base\node_modules\rollup\dist\shared\rollup.js:25675:13 at async catchUnfinishedHookActions (D:\WORK\tools\devecostudio-windows-5.0.3.300\devecostudio-windows-5.0.3.300\deveco-studio-5.0.3.300.win\deveco-studio\tools\hvigor\hvigor-ohos-plugin\node_modules@ohos\hvigor-arkts-base\node_modules\rollup\dist\shared\rollup.js:24915:20) { code: ‘PLUGIN_ERROR’, plugin: ‘genAbc’, hook: ‘buildEnd’, watchFiles: [ ‘D:\WORK\harmony\entry.preview\default\intermediates\res\default\ResourceTable.txt’, ‘D:\WORK\harmony\entry\oh-package.json5’, ‘D:\WORK\harmony\entry\src\main\ets\secondlessonability\SecondLessonAbility.ets’, ‘D:\WORK\harmony\entry\src\main\ets\entryability\EntryAbility.ets’, ‘D:\WORK\harmony\entry\src\main\ets\pages\home.ets’, ‘D:\WORK\harmony\entry\src\main\ets\loginabilitiy\LoginAbilitiy.ets’, ‘D:\WORK\harmony\oh_modules.ohpm@yunkss+eftool@1.1.10\oh_modules@yunkss\eftool\index.ets’, ‘D:\WORK\harmony\oh_modules.ohpm@yunkss+eftool@1.1.10\oh_modules@yunkss\eftool\src\main\ets\core\const\RegexConst.ets’, ‘D:\WORK\harmony\oh_modules.ohpm@yunkss+eftool@1.1.10\oh_modules@yunkss\eftool\src\main\ets\core\util\DateUtil.ets’, ‘D:\WORK\harmony\oh_modules.ohpm@yunkss+eftool@1.1.10\oh_modules@yunkss\eftool\src\main\ets\core\const\DateConst.ets’, ‘D:\WORK\harmony\oh_modules.ohpm@yunkss+eftool@1.1.10\oh_modules@yunkss\eftool\src\main\ets\core\const\City.ets’, ‘D:\WORK\harmony\oh_modules.ohpm@yunkss+eftool@1.1.10\oh_modules@yunkss\eftool\src\main\ets\core\util\ArrayUtil.ets’, ‘D:\WORK\harmony\oh_modules.ohpm@yunkss+eftool@1.1.10\oh_modules@yunkss\eftool\src\main\ets\core\util\CharUtil.ets’, ‘D:\WORK\harmony\oh_modules.ohpm@yunkss+eftool@1.1.10\oh_modules@yunkss\eftool\src\main\ets\core\util\ObjectUtil.ets’, ‘D:\WORK\harmony\oh_modules.ohpm@yunkss+eftool@1.1.10\oh_modules@yunkss\eftool\src\main\ets\core\util\IdUtil.ets’, ‘D:\WORK\harmony\oh_modules.ohpm@yunkss+eftool@1.1.10\oh_modules@yunkss\eftool\src\main\ets\core\util\PhoneUtil.ets’, ‘D:\WORK\harmony\oh_modules.ohpm@yunkss+eftool@1.1.10\oh_modules@yunkss\eftool\src\main\ets\core\util\StrUtil.ets’, ‘D:\WORK\harmony\oh_modules.ohpm@yunkss+eftool@1.1.10\oh_modules@yunkss\eftool\src\main\ets\core\util\IdCardUtil.ets’, ‘D:\WORK\harmony\oh_modules.ohpm@yunkss+eftool@1.1.10\oh_modules@yunkss\eftool\src\main\ets\core\util\Logger.ets’, ‘D:\WORK\harmony\oh_modules.ohpm@yunkss+eftool@1.1.10\oh_modules@yunkss\eftool\src\main\ets\core\util\RegUtil.ets’, ‘D:\WORK\harmony\oh_modules.ohpm@yunkss+eftool@1.1.10\oh_modules@yunkss\eftool\src\main\ets\core\util\RandomUtil.ets’, ‘D:\WORK\harmony\oh_modules.ohpm@yunkss+eftool@1.1.10\oh_modules@yunkss\eftool\src\main\ets\core\util\CryptoUtil.ets’, ‘D:\WORK\harmony\oh_modules.ohpm@yunkss+eftool@1.1.10\oh_modules@yunkss\eftool\src\main\ets\core\axios\AxiosUtil.ets’, ‘D:\WORK\harmony\oh_modules.ohpm@yunkss+eftool@1.1.10\oh_modules@yunkss\eftool\src\main\ets\core\json\JSONUtil.ets’, ‘D:\WORK\harmony\oh_modules.ohpm@yunkss+eftool@1.1.10\oh_modules@yunkss\eftool\src\main\ets\core\json\JSONArray.ets’, ‘D:\WORK\harmony\oh_modules.ohpm@yunkss+eftool@1.1.10\oh_modules@yunkss\eftool\src\main\ets\core\json\JSONObject.ets’, ‘D:\WORK\harmony\oh_modules.ohpm@yunkss+eftool@1.1.10\oh_modules@yunkss\eftool\src\main\ets\core\auth\AuthUtil.ets’, ‘D:\WORK\harmony\oh_modules.ohpm@yunkss+eftool@1.1.10\oh_modules@yunkss\eftool\src\main\ets\core\axios\EfClientApi.ets’, ‘D:\WORK\harmony\oh_modules.ohpm@yunkss+eftool@1.1.10\oh_modules@yunkss\eftool\src\main\ets\core\crypto\keyAgree\X25519.ets’, ‘D:\WORK\harmony\oh_modules.ohpm@yunkss+eftool@1.1.10\oh_modules@yunkss\eftool\src\main\ets\core\crypto\encryption\AES.ets’, ‘D:\WORK\harmony\oh_modules.ohpm@yunkss+eftool@1.1.10\oh_modules@yunkss\eftool\src\main\ets\core\crypto\encryption\ECDSA.ets’, ‘D:\WORK\harmony\oh_modules.ohpm@yunkss+eftool@1.1.10\oh_modules@yunkss\eftool\src\main\ets\core\crypto\keyAgree\ECDH.ets’, ‘D:\WORK\harmony\oh_modules.ohpm@yunkss+eftool@1.1.10\oh_modules@yunkss\eftool\src\main\ets\core\json\JSONArrayList.ets’, ‘D:\WORK\harmony\oh_modules.ohpm@yunkss+eftool@1.1.10\oh_modules@yunkss\eftool\src\main\ets\core\crypto\encryption\RSA.ets’, ‘D:\WORK\harmony\oh_modules.ohpm@yunkss+eftool@1.1.10\oh_modules@yunkss\eftool\src\main\ets\core\crypto\encryption\SM4.ets’, ‘D:\WORK\harmony\oh_modules.ohpm@yunkss+eftool@1.1.10\oh_modules@yunkss\eftool\src\main\ets\core\crypto\encryption\SM3.ets’, ‘D:\WORK\harmony\oh_modules.ohpm@yunkss+eftool@1.1.10\oh_modules@yunkss\eftool\src\main\ets\core\crypto\encryption\DES.ets’, ‘D:\WORK\harmony\oh_modules.ohpm@yunkss+eftool@1.1.10\oh_modules@yunkss\eftool\src\main\ets\core\crypto\encryption\MD5.ets’, ‘D:\WORK\harmony\oh_modules.ohpm@yunkss+eftool@1.1.10\oh_modules@yunkss\eftool\src\main\ets\core\crypto\encryption\SHA.ets’, ‘D:\WORK\harmony\oh_modules.ohpm@yunkss+eftool@1.1.10\oh_modules@yunkss\eftool\src\main\ets\core\crypto\encryption\sm2\SM2.ets’, ‘D:\WORK\harmony\oh_modules.ohpm@yunkss+eftool@1.1.10\oh_modules@yunkss\eftool\src\main\ets\core\crypto\encryption\sm2\SM2Convert.ets’, ‘D:\WORK\harmony\oh_modules.ohpm@yunkss+eftool@1.1.10\oh_modules@yunkss\eftool\src\main\ets\core\cache\CacheUtil.ets’, 'D:\WORK\harmony\oh_modules.ohpm@


更多关于HarmonyOS 鸿蒙Next 点击previewer 报错的实战系列教程也可以访问 https://www.itying.com/category-93-b0.html

2 回复

根据您提供的信息,问题可能出现在预览编译工程中有错误,请您尝试删除预览编译产物 .preview文件夹,重新预览。

更多关于HarmonyOS 鸿蒙Next 点击previewer 报错的实战系列教程也可以访问 https://www.itying.com/category-93-b0.html


针对帖子标题“HarmonyOS 鸿蒙Next 点击previewer 报错”的问题,这里提供可能的解决方案,不涉及Java或C语言内容:

在HarmonyOS鸿蒙Next系统中,点击previewer(预览器)时出现报错,通常可能是由于以下几个原因:

  1. 软件版本不兼容:确保你使用的previewer工具与当前的HarmonyOS鸿蒙Next系统版本兼容。有时新版本的操作系统可能不兼容旧版本的预览工具。

  2. 资源文件缺失或损坏:检查相关的资源文件是否完整且未损坏。如果文件缺失或损坏,可能会导致预览功能无法正常工作。

  3. 权限设置问题:确保你的应用或开发环境具有访问previewer所需的所有权限。权限不足可能导致预览器无法启动或报错。

  4. 系统缓存问题:尝试清除系统缓存或重启设备,有时缓存问题可能导致应用功能异常。

  5. 软件Bug:如果以上方法均无效,可能是previewer软件本身存在Bug。关注HarmonyOS的官方更新日志和社区讨论,查看是否有其他用户报告相同问题,并等待官方修复。

如果问题依旧没法解决请联系官网客服,官网地址是 https://www.itying.com/category-93-b0.html

回到顶部