适配Harmony OS Developer Preview1 SDK后,项目运行报错

具体日志如下:

hvigor ERROR: Unable to find the following components:

toolchains:10

Detail:

1.Go to Tools > SDK Manager > SDK > HarmonyOS, download the components, and sync the project. Open SDK Manager

2.Alternatively, modify the compileSdkVersion settings in the project-level build-profile.json5 file.

hvigor ERROR: BUILD FAILED in 2 s 110 ms

hvigor ERROR: Unable to find the following components:

toolchains:10

Detail:

1.Go to Tools > SDK Manager > SDK > HarmonyOS, download the components, and sync the project. Open SDK Manager

2.Alternatively, modify the compileSdkVersion settings in the project-level build-profile.json5 file.

hvigor ERROR: Error: Unable to find the following components:

toolchains:10

Detail:

1.Go to Tools > SDK Manager > SDK > HarmonyOS, download the components, and sync the project. Open SDK Manager

2.Alternatively, modify the compileSdkVersion settings in the project-level build-profile.json5 file.

at OhosLogger.errorMessageExit (/Users/.hvigor/project_caches/706e0038bbd8cc0c8985165a491f6fd5/workspace/node_modules/.pnpm/file+…+…+…+…+.pub-cache+git+flutter_packages-c_wjebzgtyrdq3ilvqofwocrzqti/node_modules/@ohos/hvigor/src/base/log/hvigor-log.js:1:1722)

at OhosLogger._printErrorAndExit (/Users/.hvigor/project_caches/706e0038bbd8cc0c8985165a491f6fd5/workspace/node_modules/.pnpm/file+…+…+…+…+.pub-cache+git+flutter_packages-c_j6jaog5repa4eoj4524esx6rum/node_modules/@ohos/hvigor-ohos-plugin/src/utils/log/ohos-logger.js:1:1811)

at handleSdkException (/Users/.hvigor/project_caches/706e0038bbd8cc0c8985165a491f6fd5/workspace/node_modules/.pnpm/file+…+…+…+…+.pub-cache+git+flutter_packages-c_j6jaog5repa4eoj4524esx6rum/node_modules/@ohos/hvigor-ohos-plugin/src/sdk/lib/sdk-util.js:1:1808)

at HosSdkInfo.setup (/Users/.hvigor/project_caches/706e0038bbd8cc0c8985165a491f6fd5/workspace/node_modules/.pnpm/file+…+…+…+…+.pub-cache+git+flutter_packages-c_j6jaog5repa4eoj4524esx6rum/node_modules/@ohos/hvigor-ohos-plugin/src/sdk/info/hos-sdk-info.js:1:1951)

at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

at async SdkInfo.setup (/Users/.hvigor/project_caches/706e0038bbd8cc0c8985165a491f6fd5/workspace/node_modules/.pnpm/file+…+…+…+…+.pub-cache+git+flutter_packages-c_j6jaog5repa4eoj4524esx6rum/node_modules/@ohos/hvigor-ohos-plugin/src/sdk/sdk-info.js:1:1796)

at async ProjectTaskService.setup (/Users/.hvigor/project_caches/706e0038bbd8cc0c8985165a491f6fd5/workspace/node_modules/.pnpm/file+…+…+…+…+.pub-cache+git+flutter_packages-c_j6jaog5repa4eoj4524esx6rum/node_modules/@ohos/hvigor-ohos-plugin/src/tasks/service/project-task-service.js:1:3160)

at async /Users/.hvigor/project_caches/706e0038bbd8cc0c8985165a491f6fd5/workspace/node_modules/.pnpm/file+…+…+…+…+.pub-cache+git+flutter_packages-c_j6jaog5repa4eoj4524esx6rum/node_modules/@ohos/hvigor-ohos-plugin/src/plugin/factory/plugin-factory.js:1:1033

at async executeAfterAllNodesEvaluated (/Users/.hvigor/project_caches/706e0038bbd8cc0c8985165a491f6fd5/workspace/node_modules/.pnpm/file+…+…+…+…+.pub-cache+git+flutter_packages-c_wjebzgtyrdq3ilvqofwocrzqti/node_modules/@ohos/hvigor/src/base/internal/lifecycle/configuration.js:1:5255)

at async configuration (/Users/.hvigor/project_caches/706e0038bbd8cc0c8985165a491f6fd5/workspace/node_modules/.pnpm/file+…+…+…+…+.pub-cache+git+flutter_packages-c_wjebzgtyrdq3ilvqofwocrzqti/node_modules/@ohos/hvigor/src/base/internal/lifecycle/configuration.js:1:1513)

hvigor ERROR: BUILD FAILED in 2 s 120 ms

error! when invoke: /Users/.pub-cache/git/flutter_packages-c2c21828c8da5fc5a75b1d91dde40999d43880c5/packages/webview_flutter/webview_flutter_ohos/ohos/hvigorw clean --mode module -p module=webview_flutter@default -p product=default assembleHar --no-daemon ,exitCode = 255.

error! when invoke: /Users/.pub-cache/git/flutter_packages-c2c21828c8da5fc5a75b1d91dde40999d43880c5/packages/path_provider/path_provider_ohos/ohos/hvigorw clean --mode module -p module=path_provider@default -p product=default assembleHar --no-daemon ,exitCode = 255.

Exception: ohosPluginsManager: ohosProjectPath:/Users/.pub-cache/git/flutter_packages-c2c21828c8da5fc5a75b1d91dde40999d43880c5/packages/webview_flutter/webview_flutter_ohos/ohos, assembleHar error! please check log.

HarmonyOS
8天前
浏览
收藏 0
回答 1
待解决
回答 1
按赞同
/
按时间
wjmfzsz

使用最新的sdk时,要将hvigor版本改为4.0.2

分享
微博
QQ
微信
回复
7天前
相关问题
新建空白项目运行在真机一直报错
76浏览 • 1回复 待解决
Harmony os 怎么打印当前线程?
7320浏览 • 1回复 已解决
harmony os demuxer 接口实现开源了嘛 ?
7092浏览 • 1回复 待解决
如何从官方下载鸿蒙os SDK
5146浏览 • 1回复 待解决
如何获取HarmonyOS 项目的SHA1?
3428浏览 • 1回复 待解决
关于Hi3861硬件子系统&SDK适配
6248浏览 • 5回复 已解决
neptune 烧写报错[upload] Error -1
4850浏览 • 2回复 待解决
在虚拟机上运行不了鸿蒙项目
4820浏览 • 1回复 待解决
下载编译Full-SDK报错
788浏览 • 1回复 待解决