HarmonyOS鸿蒙Next中为什么预览器打不开?

HarmonyOS鸿蒙Next中为什么预览器打不开? [Compile Result] ArkTS:ERROR: File ‘D:/Harmony/Function/Application/entry/src/main/ets/entryability/EntryAbility.ets’ has an unsupported extension. The only supported extensions are ‘.ts’, ‘.tsx’, ‘.d.ts’, ‘.cts’, ‘.d.cts’, ‘.mts’, ‘.d.mts’.

[Compile Result] The file is in the program because:

[Compile Result] Root file specified for compilation

[Compile Result] ArkTS:ERROR: File ‘D:/Harmony/Function/Application/entry/src/main/ets/pages/Auth.ets’ has an unsupported extension. The only supported extensions are ‘.ts’, ‘.tsx’, ‘.d.ts’, ‘.cts’, ‘.d.cts’, ‘.mts’, ‘.d.mts’.

[Compile Result] The file is in the program because:

[Compile Result] Root file specified for compilation

[Compile Result] ArkTS:ERROR: File ‘D:/Harmony/Function/Application/entry/src/main/ets/pages/CloudDb/CloudDb.ets’ has an unsupported extension. The only supported extensions are ‘.ts’, ‘.tsx’, ‘.d.ts’, ‘.cts’, ‘.d.cts’, ‘.mts’, ‘.d.mts’.

[Compile Result] The file is in the program because:

[Compile Result] Root file specified for compilation

[Compile Result] ArkTS:ERROR: File ‘D:/Harmony/Function/Application/entry/src/main/ets/pages/CloudDb/DbInsert.ets’ has an unsupported extension. The only supported extensions are ‘.ts’, ‘.tsx’, ‘.d.ts’, ‘.cts’, ‘.d.cts’, ‘.mts’, ‘.d.mts’.

[Compile Result] The file is in the program because:

[Compile Result] Root file specified for compilation

[Compile Result] ArkTS:ERROR: File ‘D:/Harmony/Function/Application/entry/src/main/ets/pages/CloudFunction.ets’ has an unsupported extension. The only supported extensions are ‘.ts’, ‘.tsx’, ‘.d.ts’, ‘.cts’, ‘.d.cts’, ‘.mts’, ‘.d.mts’.

[Compile Result] The file is in the program because:

[Compile Result] Root file specified for compilation

[Compile Result] ArkTS:ERROR: File ‘D:/Harmony/Function/Application/entry/src/main/ets/pages/CloudStorage.ets’ has an unsupported extension. The only supported extensions are ‘.ts’, ‘.tsx’, ‘.d.ts’, ‘.cts’, ‘.d.cts’, ‘.mts’, ‘.d.mts’.

[Compile Result] The file is in the program because:

[Compile Result] Root file specified for compilation

[Compile Result] ArkTS:ERROR: File ‘D:/Harmony/Function/Application/entry/src/main/ets/pages/Index.ets’ has an unsupported extension. The only supported extensions are ‘.ts’, ‘.tsx’, ‘.d.ts’, ‘.cts’, ‘.d.cts’, ‘.mts’, ‘.d.mts’.

[Compile Result] The file is in the program because:

[Compile Result] Root file specified for compilation

[Compile Result] ArkTS:ERROR: File ‘D:/Harmony/Function/Application/entry/src/main/ets/pages/MyIndex.ets’ has an unsupported extension. The only supported extensions are ‘.ts’, ‘.tsx’, ‘.d.ts’, ‘.cts’, ‘.d.cts’, ‘.mts’, ‘.d.mts’.

[Compile Result] The file is in the program because:

[Compile Result] Root file specified for compilation

[Compile Result] ArkTS:ERROR: File ‘D:/Harmony/Function/Application/entry/src/main/ets/pages/MyInfor.ets’ has an unsupported extension. The only supported extensions are ‘.ts’, ‘.tsx’, ‘.d.ts’, ‘.cts’, ‘.d.cts’, ‘.mts’, ‘.d.mts’.

[Compile Result] The file is in the program because:

[Compile Result] Root file specified for compilation

[Compile Result] ArkTS:ERROR: File ‘D:/Harmony/Function/Application/entry/src/main/ets/pages/MyLogin.ets’ has an unsupported extension. The only supported extensions are ‘.ts’, ‘.tsx’, ‘.d.ts’, ‘.cts’, ‘.d.cts’, ‘.mts’, ‘.d.mts’.

[Compile Result] The file is in the program because:

[Compile Result] Root file specified for compilation

[Compile Result] ArkTS:ERROR: File ‘D:/Harmony/Function/Application/entry/src/main/ets/pages/MyLoginCustom.ets’ has an unsupported extension. The only supported extensions are ‘.ts’, ‘.tsx’, ‘.d.ts’, ‘.cts’, ‘.d.cts’, ‘.mts’, ‘.d.mts’.

[Compile Result] The file is in the program because:

[Compile Result] Root file specified for compilation

[Compile Result] ArkTS:ERROR: File ‘D:/Harmony/Function/Application/entry/src/main/ets/pages/MyWelcome.ets’ has an unsupported extension. The only supported extensions are ‘.ts’, ‘.tsx’, ‘.d.ts’, ‘.cts’, ‘.d.cts’, ‘.mts’, ‘.d.mts’.

[Compile Result] The file is in the program because:

[Compile Result] Root file specified for compilation

[Compile Result] ArkTS:ERROR: File ‘D:/Harmony/Function/Application/entry/src/main/ets/pages/StudentInsertDialog.ets’ has an unsupported extension. The only supported extensions are ‘.ts’, ‘.tsx’, ‘.d.ts’, ‘.cts’, ‘.d.cts’, ‘.mts’, ‘.d.mts’.

[Compile Result] The file is in the program because:

[Compile Result] Root file specified for compilation

[Compile Result] ArkTS:ERROR: File ‘D:/Harmony/Function/Application/entry/src/main/ets/pages/StudentPage.ets’ has an unsupported extension. The only supported extensions are ‘.ts’, ‘.tsx’, ‘.d.ts’, ‘.cts’, ‘.d.cts’, ‘.mts’, ‘.d.mts’.

[Compile Result] The file is in the program because:

[Compile Result] Root file specified for compilation

[Compile Result] _typescript.default.isStructDeclaration is not a function

[Compile Result] Compile error occurred. Fix it based on the above message.


更多关于HarmonyOS鸿蒙Next中为什么预览器打不开?的实战教程也可以访问 https://www.itying.com/category-93-b0.html

2 回复

在HarmonyOS鸿蒙Next中,预览器打不开可能由以下原因导致:

  1. 资源文件缺失或损坏:预览器依赖的资源文件可能缺失或损坏,导致无法正常启动。
  2. 配置文件错误config.json或其他配置文件中的参数设置不正确,影响预览器的初始化。
  3. IDE版本不兼容:当前使用的IDE版本可能不支持鸿蒙Next的预览器功能。
  4. 系统权限不足:预览器启动时可能因权限不足而失败。
  5. 缓存问题:IDE或系统的缓存可能导致预览器无法正常启动。
  6. 网络问题:预览器启动时可能需要访问网络资源,网络连接问题可能导致启动失败。
  7. 硬件要求不满足:运行预览器的设备可能不满足最低硬件要求。
  8. 依赖库缺失:预览器依赖的库文件可能未正确安装或配置。

检查以上方面以定位并解决问题。

更多关于HarmonyOS鸿蒙Next中为什么预览器打不开?的实战系列教程也可以访问 https://www.itying.com/category-93-b0.html


在HarmonyOS鸿蒙Next中,预览器无法打开可能是由以下原因导致:

  1. 开发环境配置不完整或错误,如缺少必要的SDK或工具链;
  2. 项目代码存在语法错误或资源文件缺失;
  3. 设备连接问题,如USB调试未开启或设备驱动未正确安装;
  4. 系统资源不足,如内存或存储空间不足。

建议检查开发环境配置、项目代码、设备连接状态及系统资源,逐一排查并解决问题。

回到顶部