OpenHarmony开发者论坛
标题:
sdk_info.json文件的作用是什么?怎么配置?
[打印本页]
作者:
shixiaocheng
时间:
2024-3-19 11:39
标题:
sdk_info.json文件的作用是什么?怎么配置?
[md]### 【问题描述】
1. 介绍问题现象和发生的背景
编译过程碰到问题,提醒缺失sdk_info.json文件,请问sdk_info.json文件的作用是什么?怎么配置?
2. 相关的代码(请勿使用截图)
[OHOS INFO] out_dir:/mnt/w2/sxc/SDK/OHOS-4.0-Release/out/rk3568/gen/base/hiviewdfx/hiview
[OHOS INFO]
[OHOS INFO] ERROR at //build/templates/cxx/cxx.gni:350:26: Script returned non-zero exit code.
[OHOS INFO] handler_result = exec_script(external_deps_script, arguments, "string")
[OHOS INFO] ^----------
[OHOS INFO] Current dir: /mnt/w2/sxc/SDK/OHOS-4.0-Release/out/rk3568/
[OHOS INFO] Command: /usr/bin/env /mnt/w2/sxc/SDK/OHOS-4.0-Release/build/templates/common/external_deps_handler.py --external-deps //drivers/hdf_core/adapter/uhdf2/platform:libhdf_platform //drivers/hdf_core/adapter/uhdf2/utils:libhdf_utils --parts-src-flag-file build_configs/parts_src_flag.json --external-deps-temp-file gen/vendor/hihope/rk3568/app/product_rk3568__rk3568_gpio_test_external_deps_temp.json --sdk-base-dir ../../sdk/ohos-arm --sdk-dir-name sdk/ohos-arm --current-toolchain //build/toolchain/ohos:ohos_clang_arm --innerkits-adapter-info-file ../../build/ohos/inner_kits_adapter.json --component-override-map /mnt/w2/sxc/SDK/OHOS-4.0-Release/out/rk3568/build_configs/component_override_map.json
[OHOS INFO] Returned 1 and printed out:
[OHOS INFO]
[OHOS INFO] file '//drivers/hdf_core/adapter/uhdf2/platform/sdk_info.json' doesn't exist.
[OHOS INFO]
[OHOS INFO] stderr:
[OHOS INFO]
[OHOS INFO] Traceback (most recent call last):
[OHOS INFO] File "/mnt/w2/sxc/SDK/OHOS-4.0-Release/build/templates/common/external_deps_handler.py", line 259, in <module>
[OHOS INFO] sys.exit(main())
[OHOS INFO] File "/mnt/w2/sxc/SDK/OHOS-4.0-Release/build/templates/common/external_deps_handler.py", line 225, in main
[OHOS INFO] sdk_module_info, adapted_ok = _get_external_module_from_sdk(
[OHOS INFO] File "/mnt/w2/sxc/SDK/OHOS-4.0-Release/build/templates/common/external_deps_handler.py", line 74, in _get_external_module_from_sdk
[OHOS INFO] raise Exception("part '{}' doesn't exist in sdk modules.".format(
[OHOS INFO] Exception: part '//drivers/hdf_core/adapter/uhdf2/platform' doesn't exist in sdk modules.
[OHOS INFO]
[OHOS INFO] See //vendor/hihope/rk3568/app/BUILD.gn:4:1: whence it was called.
[OHOS INFO] ohos_executable("rk3568_gpio_test") {
[OHOS INFO] ^-------------------------------------
[OHOS INFO] See //build/ohos/ohos_part.gni:25:16: which caused the file to be included.
[OHOS INFO] _deps += [ get_label_info(module_label, "label_with_toolchain") ]
[OHOS INFO] ^--------------------------------------------------
[OHOS INFO] battery_interface_service
[OHOS INFO]
[OHOS INFO] usbd
3. 运行结果、错误截图
4. 我尝试过的解决方法和结果
5. 我想要达到的结果
### 【运行环境】
硬件:rk3568
ROM版本:4.0
DevEvoStudio版本:
SDK版本:
[/md]
作者:
creamli
时间:
2024-4-3 16:59
标题:
sdk_info.json文件的作用是什么?怎么配置?
[md]请问您解决了这个问题吗?我也遇到了类似的
[/md]
作者:
shixiaocheng
时间:
2024-4-7 09:39
回复
creamli
: 也还没有解决呢
作者:
s_hao
时间:
2024-4-7 14:29
据我所知sdk_info.json文件是OpenHarmony中的一个关键配置文件,它的作用是定义项目的SDK信息,包括依赖的模块、版本、构建选项等,如果缺少或配置错误的sdk_info.json文件会导致编译过程出错,它的配置主要是使用JSON格式指定项目依赖的模块和版本。
作者:
深开鸿_王石
时间:
2024-4-7 17:25
是不是preinstall少装东西了,重新运行下呢
作者:
shixiaocheng
时间:
2024-4-8 09:08
回复
深开鸿_王石
: 应该不是,我是编写了一个程序,调用了GPIO,然后编译过程报了这些问题。
作者:
m0_74974661
时间:
2024-10-17 19:10
回复
shixiaocheng
: 请问下您解决了这个问题么?
作者:
m0_74974661
时间:
2024-10-17 19:51
请问现在作者已经解决这个问题了么?
欢迎光临 OpenHarmony开发者论坛 (https://forums.openharmony.cn/)
Powered by Discuz! X3.5