The development environment Android Studio is an industry standard for creating mobile applications, but over time it may become unstable. Developers often encounter problems when the project does not compile, the emulator does not start, and the interface freezes when opening. In such situations, a complete reset of the configuration to the factory state often helps, which allows you to eliminate hidden caching errors and damaged settings.

The process of restoring the environment is not always obvious, since simply uninstalling the app does not affect the user configuration files. JetBrains stores settings, plugins and cache in hidden directories of the operating system. To perform clean installation, you must manually find and delete these folders before restarting the IDE.

In this article we will look in detail at the algorithm of actions for operating systems Windows, macOS i Linux. You will learn which directories are responsible for storing user data, how to safely delete them, and how to restore the working environment after a reset. We will also touch on the issues of exporting settings for those who do not want to lose their configurations forever.

Preparing for the reset procedure

Before you start deleting files, it is critical to assess the risks. A full reset will return Android Studio to the state in which you downloaded it for the first time. This means losing all custom fonts, color schemes, window layouts and, most importantly, installed plugins.

If you are using a volume license or specific proxy settings, write down their settings in advance. It is also worth checking whether the local settings store paths to specific SDK or build tools that are not located in standard directories.

โš ๏ธ Attention! Deleting configuration files is irreversible. If you have not created a backup copy of your settings through the built-in export mechanism, it will be impossible to restore them using standard means.

It is recommended to completely close the application before starting work. Sometimes processes studio64.exe or java can remain in memory even after closing the app window, which will lead to an access error when trying to delete folders.

๐Ÿ’ก

Before deleting, copy the configuration folder to another location on the disk. If resetting does not solve the problem, you can return everything as it was by simply replacing the deleted files back.

Searching and deleting configuration files in Windows

In the operating system Windows the application data storage structure may differ depending on the version Android Studio. Starting with version 2020.1, the settings paths have been changed to comply with the standards JetBrains, so it is important to know which version you have installed.

The main data is stored in two types of folders: config, where interface settings and plugins are located, and system, containing the index cache and temporary files. For versions 2020.1 and later, these folders are located in the following path:

C:\Users\%USERNAME%\AppData\Roaming\Google\AndroidStudio[Version]

C:\Users\%USERNAME%\AppData\Local\Google\AndroidStudio[Version]

If you are using an older version of the IDE, the paths will look different and link to the directory .AndroidStudio directly in the user profile. In this case, you need to look for folders here:

C:\Users\%USERNAME%\.AndroidStudio[Version]\config

C:\Users\%USERNAME%\.AndroidStudio[Version]\system

To quickly get to the desired directory, press the key combination Win + R and enter %APPDATA%. A folder Roamingwill open, where you need to find the directory Google or .AndroidStudio.... After deleting these folders, the next time you start, the environment will prompt you to import settings or create new ones.

โ˜‘๏ธ Preparing to reset in Windows

Done: 0 / 5

Reset settings in macOS and Linux

Users macOS are faced with a similar structure, but the file paths are in hidden libraries of the system. For modern versions Android Studio the configuration is located in the directory Application Support inside the user's home folder.

To find the necessary files in macOS, open a terminal or Finder and follow the path:

~/Library/Application Support/Google/AndroidStudio[Version]

~/Library/Caches/Google/AndroidStudio[Version]

Here folder Application Support is similar config in Windows, and Caches corresponds to system. Removing these directories will completely clear the application state. Don't forget to also check the folder Preferencesif there are any files starting with com.google.AndroidStudio....

In the operating system Linux paths follow XDG standards. Configuration files are usually located in a hidden folder in the home directory or in .config:

~/.config/Google/AndroidStudio[Version]

~/.cache/Google/AndroidStudio[Version]

For older versions of Linux, the paths may be: ~/.AndroidStudio[Version]/config and ~/.AndroidStudio[Version]/system. Using the command line rm -rf requires special care not to delete unnecessary files from your home directory.

How to hide files in macOS?

In Finder, press the combination Cmd + Shift + . (dot) to show hidden files and folders if you don't see the Library directory.

Cleaning the registry and environment variables

Sometimes simply deleting folders is not enough, since registry entries or environment variables pointing to old paths may remain on the system. This is especially true for Windowswhere Android Studio could have written paths to JDK or Gradle.

Check the environment variables ANDROID_HOME and ANDROID_SDK_ROOT. Although they indicate SDK settings and not IDE settings, their incorrect value may prevent normal operation after a reset. Make sure that they point to existing directories.

In the Windows registry it is worth checking the branch HKEY_CURRENT_USER\Software\Google\AndroidStudio. The presence of keys with version suffixes may indicate that the system โ€œremembersโ€ previous settings. However, only experienced users should manually delete registry keys.

Component Location in Windows Location in macOS/Linux Purpose
Configuration %APPDATA%\Google\... ~/Library/Application Support/... IDE settings, plugins
Cache and indexes %LOCALAPPDATA%\Google\... ~/Library/Caches/... Temporary files, search
Logs %LOCALAPPDATA%\Google\...\log ~/Library/Logs/... Log files errors
Projects Documents\Android\... ~/AndroidStudioProjects Source code of projects

Remember that deleting the cache will cause Android Studio to re-index all projects the first time you run them. This can take a significant amount of time depending on the power of your processor and the amount of code.

๐Ÿ’ก

Deleting the system (cache) folder is safe and often solves problems with the interface freezing, while deleting config resets all your personal settings.

Alternative method: Invalidate Caches

If your goal is not complete resetting all settings, and eliminating problems with indexing or strange behavior of the code editor, there is a softer method. In the menu Android Studio there is a built-in function to clear the cache without deleting user preferences.

To do this, go to the menu File (or Android Studio on macOS) and select Invalidate Caches.... A dialog box will open with several options.

  • ๐Ÿงน Clear file system cache and Local History โ€” Clears the file system cache and local change history. This is useful if the IDE does not see new files in the project.
  • ๐Ÿ”„ Clear VCS Log caches and indexes โ€”resets the version control system cache. Helps with problems with Git or SVN.
  • ๐Ÿ—‘๏ธ Clear downloaded shared indexes โ€” removes downloaded library indexes. May be required if autocompletion is not working correctly.
  • ๐Ÿš€ Invalidate and Restart โ€”Cleans up and immediately restarts the development environment.

This method preserves your themes, fonts, and hotkeys, but forces the IDE to rebuild project indexes from scratch. In most cases, this solves 90% of performance problems without the need for a complete configuration reset.

๐Ÿ“Š What problem do you have most often?
IDE freezes when loading
Code completion does not work
The emulator does not starts
The project does not compile
Other

Restoring work after a reset

After you have deleted the configuration folders and launched Android Studio, you will see the welcome window of the setup wizard. The system will offer to import settings from the previous version if it detects traces of them, or create a new configuration.

Select the option Do not import settingsto start from scratch. Next, you have to select a design theme (Dark or Light) and configure the initial settings of the plugins. It is recommended to install only the most necessary plugins at once to check stability.

Pay attention to the settings SDK. With a clean reset, the path to the Android SDK may be reset to default. If you installed the SDK in a non-standard location, you will have to specify the path manually in the setup wizard or in the menu File โ†’ Project Structure.

โš ๏ธ Attention! The setup wizard interface may change in new versions of Android Studio. Always check the official JetBrains docs if a menu item is missing or named differently.

After the initial setup, open an existing project. The first launch will be slow as the indexing process takes place. Wait until the progress bar in the lower right corner ends before you begin active work.

Frequently asked questions (FAQ)

Will a factory reset delete my projects and source code?

No, a factory reset Android Studio only affects configuration files the development environment itself. Your projects, source code and resource files stored in the projects folder (usually AndroidStudioProjects) will remain intact. However, links to recently opened projects in the start window will disappear.

Is it possible to restore settings if I accidentally deleted the config folder?

There is no built-in โ€œundo deleteโ€ function in the operating system for this case. The only way to restore is to have a previously created backup copy of the folder config. If you did not make a backup, the settings are lost forever and will have to be configured again manually.

Why does Android Studio ask you to accept the license agreement after a reset?

Files containing confirmation of acceptance of the license agreements of Android SDK components are often stored in the same directory system or config, which is deleted upon reset. After cleaning, you will have to re-accept the licenses via SDK Manager or the command line. sdkmanager --licenses.

Should you delete the .gradle folder when resetting the settings?

The folder .gradle is located separately from the IDE settings (usually in the user's home folder) and stores the dependency cache and the Gradle wrapper. Removing it is not necessary to reset Android Studio, but it may free up disk space. The next time the project is built, the dependencies will be downloaded again.

How to transfer settings to another computer without a full reset?

Instead of manually copying folders, use the built-in function File โ†’ Manage IDE Settings โ†’ Export Settings. This will create an archive .jar with all your settings, plugins and schemes, which can be imported on another computer through the menu Import Settings.