How to reset Android Studio

2019-01-01 08:27发布

问题:

I want to reset Android Studio 0.2.13 to the default state. That means reset all settings, remove all projects, all gradle files so that it would act like a fresh installation. What steps do I have to follow to achieve this?

回答1:

I only know how to do this on Windows (but it should be similar on any OS, you will just need to find the correct location yourself - google search would help with that).

On Windows:

Go to your User Folder - on Windows 7/8 this would be:

[SYSDRIVE]:\\Users\\[your username] (ex. C:\\Users\\JohnDoe\\)

In this folder there should be a folder called .AndroidStudioBeta or .AndroidStudio (notice the period at the start - so on some OSes it would be hidden).

Delete this folder (or better yet, move it to a backup location - so you can return it if something goes wrong).

This should reset your Android Studio settings to default.



回答2:

On Mac OS X

Remove these directories:

~/Library/Application Support/AndroidStudioBeta  
~/Library/Caches/AndroidStudioBeta
~/Library/Logs/AndroidStudioBeta  
~/Library/Preferences/AndroidStudioBeta


回答3:

For MaxOSX:

rm -rfv ~/Library/Application\\ Support/AndroidStudio*
rm -rfv ~/Library/Preferences/AndroidStudio*
rm -rfv ~/Library/Caches/AndroidStudio*
rm -rfv ~/Library/Logs/AndroidStudio*
rm -rfv ~/.AndroidStudio*

For Android Studio 1.2.2 version, config path is ~/Library/Application\\ Support/AndroidStudio1.2/ and ~/Library/Preferences/AndroidStudio1.2, so it\'s better to rm matching prefix.



回答4:

On Mac OS X with Android Studio >= 1.0.0

Run these lines:

rm -rf ~/Library/Application Support/AndroidStudio
rm -rf ~/Library/Caches/AndroidStudio 
rm -rf ~/Library/Logs/AndroidStudio
rm -rf ~/Library/Preferences/AndroidStudio


回答5:

From Linux this is what I did:

Remove the .AndroidStudioBeta folder:

rm -r ~/.AndroidStudioBeta

Remove the project folder. For example:

rm -r ~/AndroidStudioProjects

I needed to do both or stuff kept hanging around.

Hope this helps.



回答6:

Linux Android Studio 0.8.6:

rm -R ~/.AndroidStudioBeta/config/

Linux Android Studio 1.0.0:

rm -R ~/.AndroidStudio/config/



回答7:

On a Mac

Delete these using the terminal (usage: rm -rf folderpath):

~/Library/Preferences/AndroidStudioBeta
~/Library/Application Support/AndroidStudioBeta
~/Library/Caches/AndroidStudioBeta
~/Library/Logs/AndroidStudioBeta


回答8:

Windows Users: Look for C:->Users->YourUserName->.AndroidStudio or .AndroidStudioBeta folder. Delete that.

Mac Users: Delete these using the terminal (usage: rm -rf folderpath): ~/Library/Preferences/AndroidStudioBeta ~/Library/Application Support/AndroidStudioBeta ~/Library/Caches/AndroidStudioBeta ~/Library/Logs/AndroidStudioBeta

Linus Users: Delete these using the terminal (usage: rm -r folderpath): ~/.AndroidStudioBeta/config or ~/.AndroidStudio/config



回答9:

For Mac

  1. Install https://freemacsoft.net/appcleaner/
  2. Drag and drop Android Studio into AppCleaner
  3. uncheck the first box only(keeps the app and deletes the rest)
  4. Cmd + Shift + dot(.) to see hidden folders in Finder
  5. Delete the content of User/~Library/Android/sdk
  6. Open Android Studio and follow its instructions.


回答10:

We can no longer reset android studio to it\'s default state by the answers/methods given in this question from android studio 3.2.0 Here is the updated new method to do it (It consumes less time as it does not require any update/installation).

For Windows

  1. Open my computer

  2. Go to C:\\Users\\Username\\.android\\build-cache

  3. Delete the cache/files found inside the folder build-cache

  4. Note: do not delete the folder named as \"3.2.0\" and \"3.2.1\" which will be inside the build-cache

  5. Restart Android studio.

and that would completely reset your android studio settings from Android studio 3.2.0 and up.



回答11:

Linux AnddroidStudio 1.1.0

rm -r ~/.AndroidStudio


回答12:

Build - Clean project. Basically, this is a problem with studio 3.0. https://developer.android.com/studio/build/gradle-plugin-3-0-0.html (authorized link).



回答13:

  1. Open Home
  2. Press Ctrl+H (to show hidden files)
  3. Delete AndroidStudio setting folder (like image below)
  4. Restart Android Studio

\"Android