You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

macOS通过Brew安装bundletool后,appium-doctor无法识别该工具

解决Appium Doctor无法识别brew安装的bundletool问题

问题原因

通过brew install bundletool安装的bundletool是封装脚本,而非Appium Doctor默认查找的bundletool.jar文件,因此出现识别失败的警告。

解决方案

方案1:设置BUNDLETOOL_JAR环境变量

  1. 获取bundletool的jar包路径:
    先执行命令拿到bundletool的安装根目录:

    brew --prefix bundletool
    

    输出类似/opt/homebrew/Cellar/bundletool/1.15.0,进入该目录下的libexec文件夹,即可找到bundletool-all.jar,完整路径示例为/opt/homebrew/Cellar/bundletool/1.15.0/libexec/bundletool-all.jar。

  2. 配置环境变量:
    打开你的shell配置文件(如~/.zshrc或~/.bash_profile),添加以下内容(替换为你实际的jar路径):

    export BUNDLETOOL_JAR="/opt/homebrew/Cellar/bundletool/1.15.0/libexec/bundletool-all.jar"
    
  3. 使配置生效:

    source ~/.zshrc
    
  4. 验证:
    执行echo $BUNDLETOOL_JAR确认路径正确,再运行appium-doctor即可看到警告消失。

方案2:创建软链接指向jar包

直接将bundletool的jar包链接到PATH目录下,命名为bundletool.jar让Appium Doctor识别:

ln -s /opt/homebrew/Cellar/bundletool/[你的版本号]/libexec/bundletool-all.jar /opt/homebrew/bin/bundletool.jar

替换[你的版本号]为实际版本(如1.15.0),执行后重新运行appium-doctor即可。

内容的提问来源于stack exchange,提问作者Patrick Kenny

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.09 04:02:43