1. Finder里, shift+command+g, 进入如下文件夹

 /Applications/Android Studio.app/Contents/bin/studio.vmoptions

2. 打开此文件,用文本编辑器或者Vim

3.在最后一行添加如下内容:

-Djava.net.preferIPv4Stack=true
-Didea.updates.url=http://dl.google.com/android/studio/patches/updates.xml
-Didea.patches.url=http://dl.google.com/android/studio/patches/


4.存盘退出