适配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.
使用最新的sdk时,要将hvigor版本改为4.0.2