此處將使用Homebrew安裝JDK以及Android Studio
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo '# Set PATH, MANPATH, etc., for Homebrew.' >> /Users/使用者名稱/.zprofile
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/使用者名稱/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
brew -v
,若安裝成功則會顯示版本號碼,如:Homebrew 4.1.9brew install openjdk
。若有舊版本需求可加上版號,如:brew install openjdk@17
java -version
,若安裝成功則會顯示版本號碼,如:openjdk version "20.0.2" 2023-07-18brew install --cask android-studio
brew list
查詢是否出現 android-studio下方擇一下載