链接:
集成三方SDK
执行到中间的步骤,输入指令出错。python build.py wifiiot --target //domains/iot/link:iot
错误log:
sean@sean-virtual-machine:~/HarmonyOS_Code$ python build.py wifiiot --target //domains/iot/link:iot
usage:
python build.py ipcamera_hi3516dv300
python build.py ipcamera_hi3518ev300
python build.py wifiiot
build.py: error: unrecognized arguments: --target //domains/iot/link:iot
单独执行指令正确 python build.py wifiiot
之后修改build/lite/product/wifiiot.json下wifiiot相关参数如下
{
"name": "domains",
"component": [
{ "name": "wifi-iot", "dir": "//domains/iot/link", "features":[] }
]
},
使用指令python build.py wifiiot 编译出错,错误信息如下:
sean@sean-virtual-machine:~/HarmonyOS_Code$ python build.py wifiiot
=== start build ===
ERROR at //domains/iot/link/BUILD.gn:24:15: Assignment had no effect.
version = "1.0.0"
^------
You set the variable "version" here and it was unused before it went
out of scope.
See //build/lite/BUILD.gn:19:19: which caused the file to be included.
product_cfg = read_file("//build/lite/product/${product}.json", "json")
^-------------------------------------------------------
you can check build log in /home/sean/HarmonyOS_Code/out/wifiiot/build.log
/home/sean/gn/gn gen /home/sean/HarmonyOS_Code/out/wifiiot --root=. --dotfile=build/lite/.gn --args='product = "wifiiot" ohos_build_type = "release"' failed, return code is 1
usage:
python build.py ipcamera_hi3516dv300
python build.py ipcamera_hi3518ev300
python build.py wifiiot
positional arguments:
product Name of the product
optional arguments:
-h, --help show this help message and exit
-b BUILD_TYPE, --build_type BUILD_TYPE
release or debug version.
-t [TEST [TEST ...]], --test [TEST [TEST ...]]
Compile test suit
-n, --ndk Compile ndk
请问又遇到相同问题的小伙伴吗?请教下应该如何解决,乔帮主跟我说在application里面进行代码编写,但我觉得如果guide里面的例程都通过不了,那文档本身就存在问题了 :( 谢谢了。