iMac 平台按照官方文档配置 hdc 命令不生效

​操作步骤:1、按照下面文档配置 hdc 命令, https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/hdc-0000001815246474#ZH-CN_TOPIC_0000001864901001__%E5%8F%AF%E9%80%89%E9%85%8D%E7%BD%AE%E5%85%A8%E5%B1%80%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F具体信息如下:kevingpqi@KEVINGPQI-MC3 ~ % echo SHELL /bin/zsh kevingpqi@KEVINGPQI-MC3 ~ % cat ~/.zshrc export PATH="/usr/local/opt/icu4c/bin:PATH"export PATH="/usr/local/opt/icu4c/sbin:$PATH"

Add RVM to PATH for scripting. Make sure this is the last PATH variable change.

export PATH=“<math><semantics><mrow><mi>P</mi><mi>A</mi><mi>T</mi><mi>H</mi><mo>:</mo></mrow><annotation encoding="application/x-tex">PATH:</annotation></semantics></math>PATH:HOME/.rvm/bin”export PATH="/Users/kevingpqi/Documents/01SoftWare/Qt5.13.0/5.13.0/clang_64/bin:$PATH"

source ~/.bash_profileexport PATH="/usr/local/opt/ruby/bin:<math><semantics><mrow><mi>P</mi><mi>A</mi><mi>T</mi><mi>H</mi><mi mathvariant="normal">"</mi><mi>e</mi><mi>x</mi><mi>p</mi><mi>o</mi><mi>r</mi><mi>t</mi><mi>P</mi><mi>A</mi><mi>T</mi><mi>H</mi><mo>=</mo><mi mathvariant="normal">"</mi><mi mathvariant="normal">/</mi><mi>u</mi><mi>s</mi><mi>r</mi><mi mathvariant="normal">/</mi><mi>l</mi><mi>o</mi><mi>c</mi><mi>a</mi><mi>l</mi><mi mathvariant="normal">/</mi><mi>o</mi><mi>p</mi><mi>t</mi><mi mathvariant="normal">/</mi><mi>b</mi><mi>i</mi><mi>n</mi><mi>u</mi><mi>t</mi><mi>i</mi><mi>l</mi><mi>s</mi><mi mathvariant="normal">/</mi><mi>b</mi><mi>i</mi><mi>n</mi><mo>:</mo></mrow><annotation encoding="application/x-tex">PATH" export PATH="/usr/local/opt/binutils/bin:</annotation></semantics></math>PATH"exportPATH="/usr/local/opt/binutils/bin:PATH"export PATH="/Users/kevingpqi/Documents/09Harmony/Tools/command-line-tools/bin:$PATH"export HDC_SERVER_PORT=7035launchctl setenv HDC_SERVER_PORT $HDC_SERVER_PORTexport HDC_SERVER_PORTkevingpqi@KEVINGPQI-MC3 ~ % source ~/.zshrckevingpqi@KEVINGPQI-MC3 ~ % hdc -hzsh: command not found: hdckevingpqi@KEVINGPQI-MC3 ~ %kevingpqi@KEVINGPQI-MC3 ~ %kevingpqi@KEVINGPQI-MC3 ~ % codelinter --helpUsage: codelinter [options] [dir]

Options:-v --version Displays the version information of CodeLinter.-c --config <configPath> Indicates the path of the CodeLinter configuration file, which must be in .json or .json5 format. Optional.–fix Specifies whether to automatically fix defects during code linting. Optional.-o --output <reportFile> Indicates the path of the linting report. Optional.-p --product <productName> Indicates the name of the currently active product. Optional.-f --format <outputFormat> Indicates the output format: default, json, or xml. Optional. The default value is default.-h --help Displays the help information of CodeLinter.Argument:[dir] Indicates the root directory of the project to lint. Optional. The default value is the current context directory.kevingpqi@KEVINGPQI-MC3 ~ %

已按照文档要求 “关闭并重启DevEco Studio” 无法找到 hdc 命令,在 IDE中的Termina 中也是如此

2、下面文档中的命令行设置无问题, 如上面执行的 codelinter --helphttps://developer.huawei.com/consumer/cn/doc/harmonyos-guides/ide-command-line-tools-0000001124588437​

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

需要配置全局环境变量:https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/hdc-0000001815246474#ZH-CN_TOPIC_0000001864901001__可选配置全局环境变量。

分享
微博
QQ
微信
回复
1天前
相关问题
Hi3516按照官方文档无法进入ohos shell
7505浏览 • 3回复 待解决
abiFilters配置生效
291浏览 • 1回复 待解决
HarmonyOS 编译器配置生效
335浏览 • 1回复 待解决
如何查看官方的xml文档
10737浏览 • 2回复 待解决
HarmonyOS hdc命令咨询
289浏览 • 1回复 待解决
HarmonyOS margin生效
487浏览 • 1回复 待解决
HarmonyOS expandSafeArea生效
174浏览 • 1回复 待解决
ConstraintSize尺寸设置生效
2277浏览 • 1回复 待解决
HarmonyOS @Observed生效问题
212浏览 • 1回复 待解决
如何通过HDC命令获取imei号
3129浏览 • 0回复 待解决
HarmonyOS 如何使用hdc命令查看日志?
115浏览 • 1回复 待解决
按照Api进行指纹认证功能调起来
260浏览 • 1回复 待解决
容器组件onVisibleAreaChange生效
1759浏览 • 1回复 待解决
使用position之后height生效
2324浏览 • 1回复 待解决
HarmonyOS 关于onKeyEvent生效问题
196浏览 • 1回复 待解决
HarmonyOS photoViewPicker智能推荐生效
95浏览 • 1回复 待解决
hdc命令在git bash命令工具中不可使用
216浏览 • 1回复 待解决
无法使用hdc命令怎么办?
3051浏览 • 1回复 待解决