1、下載gradle
https://services.gradle.org/distributions/ 並解壓
2、解壓的文件夾拷貝到 android studio 跟目錄下
3、用touch .bash_profile 生成.bash_profile文件
4、open -e .bash_profile 打開編輯文件
5、把gradle 的bin 目錄拉到終端獲取路徑
6、在bash_profile 寫入
export GRADLE_HOME=/Applications/Android\ Studio.app/Contents/gradle-5.4.1
export PATH=${PATH}:${GRADLE_HOME}/bin
7、最后使用source .bash_profile使之生效