1、下载地址:https://dl.google.com/dl/android/studio/install/3.5.2.0/android-studio-ide-191.5977832-mac.dmg
2、配置SDK:https://jingyan.baidu.com/article/a24b33cd2688ed19fe002b86.html
3、Start a new Anndroid Studio project--next--Language选择java--finish
4、View--Toolbar。
5、在1和2处添加如下代码,添加完后点击open Project Structure--新界面点击OK按钮,等待更新完成即可
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' } maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' } maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' } maven { url 'http://maven.aliyun.com/nexus/content/repositories/gradle-plugin' }
6、卸载AS。
MAC拖拽的方式卸载不干净,所以重装AS后还是使用以前的SDK,Gradle以及之前所有的配置,如下方法可彻底删除干净
rm -Rf /Applications/Android\ Studio.app rm -Rf ~/Library/Preferences/AndroidStudio* rm ~/Library/Preferences/com.google.android.studio.plist rm -Rf ~/Library/Application\ Support/AndroidStudio* rm -Rf ~/Library/Logs/AndroidStudio* rm -Rf ~/Library/Caches/AndroidStudio*
执行完这些命令后,AS被彻底删除。删除AS的项目,执行如下命令:
rm -Rf ~/AndroidStudioProjects
删除AndroidStudio SDK Tools
rm -Rf ~/Library/Android*
移除gradle工具相关的文件(缓存和包装)
rm -Rf ~/.gradle
来源:https://www.cnblogs.com/qianmaoliugou/p/12370165.html