HarmonyOS 鸿蒙Next IDE Developer 版本无法运行,每次都需要清理缓存重启才可以

发布于 1周前 作者 ionicwang 最后一次编辑是 5天前 来自 鸿蒙OS

HarmonyOS 鸿蒙Next IDE Developer Beta1版本无法运行,每次都需要清理缓存重启才可以

项目是从API 11升级到12的

IDE版本: Build Version: 5.0.3.404, built on July 4, 2024

运行设备:iMac,芯片M1,

现象:每次都需要点击【Invalidate Cache】才可以运行正常,否则都会报下面的错误。这就导致我需要一直重启IDE一致重启IDE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

报错信息:

1 ERROR: ArkTS:ERROR File: /Applications/DevEco-Studio.app/Contents/sdk/HarmonyOS-NEXT-DB1/openharmony/ets/api/@ohos.arkui.UIContext.d.ts:37:15

 Only “Sendable” classes and “Sendable” interfaces are allowed for importing from ets into ts file (arkts-no-ts-import-ets)

2 ERROR: ArkTS:ERROR File: /Applications/DevEco-Studio.app/Contents/sdk/HarmonyOS-NEXT-DB1/openharmony/ets/api/@ohos.arkui.UIContext.d.ts:37:22

 Only “Sendable” classes and “Sendable” interfaces are allowed for importing from ets into ts file (arkts-no-ts-import-ets)

3 ERROR: ArkTS:ERROR File: /Applications/DevEco-Studio.app/Contents/sdk/HarmonyOS-NEXT-DB1/openharmony/ets/api/@ohos.arkui.UIContext.d.ts:37:33

 Only “Sendable” classes and “Sendable” interfaces are allowed for importing from ets into ts file (arkts-no-ts-import-ets)

COMPILE RESULT:FAIL {ERROR:4 WARN:6}

2 回复
升级到bata2之后可以正常

HarmonyOS 鸿蒙Next IDE Developer Beta1版本无法运行,可能因缓存问题导致。建议尝试彻底清理IDE缓存并重启IDE。同时,检查IDE和JDK版本兼容性,确保已安装支持版本。如果问题依旧,可能是Beta版本本身的bug,建议查看华为开发者官网或相关论坛是否有已知问题和解决方案。如果问题依旧没法解决,请加我微信,我的微信是itying888。

回到顶部