美文网首页
Mac 安装gradle

Mac 安装gradle

作者: 西安法律咨询服务平台与程序员 | 来源:发表于2021-09-28 16:58 被阅读0次

1、先安装brew

官网:https://brew.sh/

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

2、安装Gradle

brew install gradle
  • 遇到的错误
Warning: No available formula or cask with the name "gradle".
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching taps on GitHub...
Error: No formulae found in taps.
  • 解决办法
cd /usr/local/Homebrew/Library/Taps/homebrew/
rm -rf homebrew-core
git clone https://github.com/Homebrew/homebrew-core.git

重新安装一次homebrew-core,完美解决。查看version。

gradle -v

相关文章

网友评论

      本文标题:Mac 安装gradle

      本文链接:https://www.haomeiwen.com/subject/lurrnltx.html