如何在Mac上完全卸载Android Studio? [英] How to completely uninstall Android Studio on Mac?

查看:738
本文介绍了如何在Mac上完全卸载Android Studio?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近在Macbook Pro上下载了Android Studio,每次打开时都会弄乱它.它给了我插件错误和其他一些错误.我需要从Mac完全卸载它.我试图从Mac中删除它,然后像第一次安装一样再次安装它,但是它什么也没做,现在又出现了同样的问题.

I recently downloaded Android Studio on my Macbook Pro and I messed up with it every time I open it. It gives me plugin errors and several other errors. I need to uninstall it completely from my mac. I tried to delete it from my mac and then install it again as if you would do the first time, but it did nothing and now the same problems occur.

我如何设法将其完全删除并重新安装新的?

推荐答案

在终端中执行以下命令(不包括带有标签的行-它们是注释):

Execute these commands in the terminal (excluding the lines with hashtags - they're comments):

# Deletes the Android Studio application
# Note that this may be different depending on what you named the application as, or whether you downloaded the preview version
rm -Rf /Applications/Android\ Studio.app
# Delete All Android Studio related preferences
# The asterisk here should target all folders/files beginning with the string before it
rm -Rf ~/Library/Preferences/AndroidStudio*
# Deletes the Android Studio's plist file
rm -Rf ~/Library/Preferences/com.google.android.*
# Deletes the Android Emulator's plist file
rm -Rf ~/Library/Preferences/com.android.*
# Deletes mainly plugins (or at least according to what mine (Edric) contains)
rm -Rf ~/Library/Application\ Support/AndroidStudio*
# Deletes all logs that Android Studio outputs
rm -Rf ~/Library/Logs/AndroidStudio*
# Deletes Android Studio's caches
rm -Rf ~/Library/Caches/AndroidStudio*
# Deletes older versions of Android Studio
rm -Rf ~/.AndroidStudio*

如果您要删除所有项目:

rm -Rf ~/AndroidStudioProjects

要删除与gradle相关的文件(缓存和包装器)

To remove gradle related files (caches & wrapper)

rm -Rf ~/.gradle

使用以下命令删除所有 Android虚拟设备(AVD)和密钥库.

Use the below command to delete all Android Virtual Devices(AVDs) and keystores.

注意:其他Android IDE也会使用此文件夹,因此,如果您仍在使用其他IDE,则可能不想删除此文件夹)

Note: This folder is used by other Android IDEs as well, so if you still using other IDE you may not want to delete this folder)

rm -Rf ~/.android

要删除Android SDK工具

To delete Android SDK tools

rm -Rf ~/Library/Android*

仿真器控制台身份验证令牌

Emulator Console Auth Token

rm -Rf ~/.emulator_console_auth_token

感谢那些对此答案发表评论或改进的人!

Thanks to those who commented/improved on this answer!

  1. rm的标志区分大小写
  1. The flags for rm are case-sensitive1 (as with most other commands), which means that the f flag must be in lower case. However, the r flag can also be capitalised.
  2. The flags for rm can be either combined together or separated. They don't have to be combined.

标志指示什么

  1. r标志指示rm命令应-
  1. The r flag indicates that the rm command should-

a 尝试删除根植于每个文件参数中的文件层次结构.-rm的联机帮助页上的 DESCRIPTION 部分(有关更多信息,请参见man rm)

attempt to remove the file hierarchy rooted in each file argument. - DESCRIPTION section on the manpage for rm (See man rm for more info)

  • f标志指示rm命令应-

  • The f flag indicates that the rm command should-

    a 尝试删除文件而无需提示确认,无论文件的权限如何.-rm的联机帮助页上的 DESCRIPTION 部分(请参见man rm更多信息)

    attempt to remove the files without prompting for confirmation, regardless of the file's permissions. - DESCRIPTION section on the manpage for rm (See man rm for more info)

  • 这篇关于如何在Mac上完全卸载Android Studio?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆