适配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
2024-05-13 21:39:53
浏览
收藏 0
回答 1
待解决
回答 1
按赞同
/
按时间
wjmfzsz

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

分享
微博
QQ
微信
回复
2024-05-14 22:18:09
相关问题
HarmonyOS h5页面是否可以适配Harmony OS
308浏览 • 1回复 待解决
Harmony os 怎么打印当前线程?
9092浏览 • 1回复 已解决
HarmonyOS 更改项目的bundlename报错
674浏览 • 1回复 待解决
HarmonyOS NEXT Developer Beta1模拟器闪退
1066浏览 • 1回复 待解决
harmony os demuxer 接口实现开源了嘛 ?
8688浏览 • 1回复 待解决
HarmonyOS 集成RN 5.0.0.100 运行报错
241浏览 • 1回复 待解决
新建空白项目运行在真机一直报错
700浏览 • 1回复 待解决
如何从官方下载鸿蒙os SDK
7468浏览 • 1回复 待解决
Harmony OS有没有类似KeyChain的api提供
270浏览 • 1回复 待解决
如何获取HarmonyOS 项目的SHA1?
4973浏览 • 1回复 待解决