我最近在我的Macbook Pro上下载了Android Studio,每次打开它我都搞砸了。它给了我插件错误和其他一些错误。我需要从我的mac上完全卸载它。我试图从我的mac上删除它,然后重新安装,就像你第一次做的那样,但它什么都没有,现在出现了同样的问题。

我如何才能完全删除它,并重新安装一个新的?


当前回答

在终端中执行如下命令:

rm -Rf /Applications/Android\ Studio.app  
rm -Rf ~/Library/Preferences/AndroidStudio*  
rm -Rf ~/Library/Preferences/com.google.android.*  
rm -Rf ~/Library/Preferences/com.android.*  
rm -Rf ~/Library/Application\ Support/AndroidStudio*  
rm -Rf ~/Library/Logs/AndroidStudio*  
rm -Rf ~/Library/Caches/AndroidStudio*  
rm -Rf ~/.AndroidStudio*  
rm -Rf ~/.gradle  
rm -Rf ~/.android  
rm -Rf ~/Library/Android*  
rm -Rf /usr/local/var/lib/android-sdk/  

删除所有项目。

rm -Rf ~/AndroidStudioProjects  

其他回答

我的Macbook Pro也遇到了同样的问题。我采取了这些非常简单的步骤,并新安装了Android Studio。

**链接包含图片,看看是否面临任何问题。

这些非常简单的步骤可以解决你的问题。

Type "Command+option+Space Bar" Type "Android Studio" Click '+' button just below search box. A new bar will come up "Kind" is "any" click on "kind" --> Others --> search for "system file" and select that by putting a tick mark.! And click on Ok. Then select "are included" from the drop down menu ! Then you get a lot of system file that need to be deleted to complete the fully un-installation of any app. Click "command+A" to select all files and take a look on the file remove is some video files are also included. And click "command + Delete" Empty your trash. Done

Simon单独列出的一些文件也可以在类似以下命令的情况下找到,但需要额外保证完整性,并且没有鲁莽地使用带有通配符的rm -rf:

find ~ \
  -path ~/Library/Caches/Metadata/Safari -prune -o \
  -iname \*android\*studio\* -print -prune

另外,不要忘记SDK,它现在与应用程序分离,还有~/。Gradle /(见vijay的回答)。

你也可以删除gradle文件,如果你不使用gradle在其他任何地方:

rm -Rfv ~/.gradle/

因为.gradle文件夹包含不再需要的缓存工件。

在终端中执行如下命令:

rm -Rf /Applications/Android\ Studio.app  
rm -Rf ~/Library/Preferences/AndroidStudio*  
rm -Rf ~/Library/Preferences/com.google.android.*  
rm -Rf ~/Library/Preferences/com.android.*  
rm -Rf ~/Library/Application\ Support/AndroidStudio*  
rm -Rf ~/Library/Logs/AndroidStudio*  
rm -Rf ~/Library/Caches/AndroidStudio*  
rm -Rf ~/.AndroidStudio*  
rm -Rf ~/.gradle  
rm -Rf ~/.android  
rm -Rf ~/Library/Android*  
rm -Rf /usr/local/var/lib/android-sdk/  

删除所有项目。

rm -Rf ~/AndroidStudioProjects  

适用于使用MacOS 10.15.1或以上版本的Android Studio 4.0或以上版本。使用命令行吹:

# 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/Google/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/Google/AndroidStudio*
# Deletes all logs that Android Studio outputs
rm -Rf ~/Library/Logs/Google/AndroidStudio*
# Deletes Android Studio's caches
rm -Rf ~/Library/Caches/Google/AndroidStudio*
# Deletes older versions of Android Studio
rm -Rf ~/.AndroidStudio*

区别

Library / Preferences /谷歌/ AndroidStudio *

图书馆/ Logs /谷歌/ AndroidStudio *

Library / Caches /谷歌/ AndroidStudio *