You’re ready to develop your Android app, but Android Studio surprises you: it won’t start. It’s frustrating, isn’t it? But do not worry; You’re not alone.
We will show you the detailed steps to resolve Android Studio not working on Windows issue.
What are the requirements for Android Studio?
Android Studio can be demanding on your system while working on large projects. To avoid performance issues, make sure your computer meets the following requirements:
- OS: Windows 8/10/11 (64-bit)
- Processor type: 2nd generation or better Intel Core
- RAM: 8GB or more
- Minimum disk space required: 8GB
You may encounter crash issues if your computer does not meet these specifications. In that case, consider upgrading your hardware.
Now that you know the system requirements, let’s move on to the steps to fix Android Studio not working on Windows.
1. Install the latest version of JDK
JDK (Java Development Kit) is a package of files that allows Android Studio to successfully create and run Android applications on your computer. If Android Studio crashes frequently, try installing the latest JDK available.
See our guide on how to install JDK on Windows for steps. After installing the JDK, set up the JAVA system environment variables.
2. Configure JAVA system variables
Setting JAVA system variables helps your system recognize the JDK installation directory. We have explained the procedure in our guide to setting environment variables. You can refer to that to adjust JAVA system variables for Android Studio.
Be sure to double check the path when modifying system variables. With the JAVA system variables set, Android Studio should run without issue.
3. Invalidate the Android Studio settings cache
You may not know it, but Android Studio allows you to clear its cache with just one click. While you don’t need to clear the cache every time, it is sometimes necessary, such as when Android Studio crashes frequently.
So first clean the cache of Android Studio. This is how you can clear Android Studio’s cache:
- Restart Android Studio if it is already running on your computer.
- Click on Archive in the upper left corner of your current project window.
- Select invalidate caches from the drop down menu.
- Select or check all the boxes under the Optional text in the following pop-up window.
- Click on the Invalidate and restart button to clear your cache.
The invalidate cache option clears the cache files and helps update the IDE’s internal index and other cached data. Doing so can resolve issues related to outdated or corrupted cache files and fix Android Studio crashing issues.
4. Rename Android Studio directory
Clearing the cache only helps in case the internal index is corrupted; What if the Android Studio directory is damaged? In this case, renaming the damaged directory is the way to go. It will force Android Studio to restore the default settings.
If you rename the Android Studio directory, you will lose custom settings such as code style settings and keymaps. Be sure to create a backup of all required settings.
Now follow the steps below to rename Android Studio directory:
- press the win + E shortcut keys to open Windows File Explorer. Navigate to the location of your user folder i.e. C:\Users\{User Account Name}.
- At the top right click on the folder named .android.
- Select Rename in the context menu, add .old at the end of the folder name (eg, .android.old), and press Get into. This way, you can rename it back to .android if you want to restore your old Android Studio setup.
- Now, restart Android Studio. You should create a new directory with new configuration files.
This process can take a few minutes while Android Studio sets up the new environment. Hopefully Android Studio should now work without any issues.
5. Launch Android Studio with compatibility mode
Compatibility mode is an old Windows feature that forces any program to run in a mode that simulates older versions of Windows.
Sometimes Android Studio may not work well with the latest version of Windows, but running it in compatibility mode might solve the problem.
Here’s how to start Android Studio in compatibility mode on Windows:
- Right click on the android studio shortcut (studio64) in his desk.
- Select the Properties context menu option.
- About him Properties window, click the Compatibility eyelash.
- Check or check the box next to Run this program in compatibility mode to.
- Click Apply and then OK to save the changes.
Now try it! Launch Android Studio using the modified shortcut. If all goes well, it should open without a problem.
If Android Studio still doesn’t work, try changing the compatibility mode to a different version of Windows and see if that resolves the issue.
6. Disable Android Studio plugins
Android Studio plugins can sometimes create conflicts or consume excessive resources, causing the application to crash or fail to start.
You can disable unnecessary or recently installed plugins to check for the problem. You can disable Android Studio plugins from File > Settings > Plugins section.
To disable a plugin, uncheck the box next to it. Once you’re done, you can restart Android Studio.
7. Reinstall Android Studio
If all the above methods don’t work, reinstalling Android Studio is the last resort.
Before reinstalling it, uninstall it from the control panel or Settings > Apps > Installed apps. You can also use one of the best uninstallers for Windows for a complete removal.
Here’s how to install Android Studio on Windows:
- Open the Android developer website and download the latest version of Android Studio.
- Run the setup file from the downloads folder and follow the setup guidelines.
- Wait for the installer to unzip the necessary files. Click Finish to open Android Studio for further configuration.
- Select the default JDK location to the location where you installed the JDK, i.e. C:\Program Files\Android\Android Studio\jdk.
- Proceed to onboarding and click Finish to download the necessary components.
Once the installer downloads all the files, it will ask you to open Android Studio. You can continue your work after that without any crash.
8. Edit the vmoptions file
The .vmoptions file is a configuration file that allows you to adjust the RAM allocation and the size of the heap (storage, in simple words). Adjusting both can help resolve issues like random crashes or crashes in Android Studio.
Follow these steps to edit the .vmoptions file in Windows:
- Navigate to the Android Studio installation folder i.e. C:\Program Files\Android\Android Studio\bin.
- Look for a file that ends with .vmoptions. In our case, the file is studio64.exe.vmoptions.
- Right click on it and open it with any text editor. You can check out our list of the best code editors for Windows to choose one for your PC.
- Increase the RAM allocation by modifying the -xmx worth. For example, change -Xmx1280m to -xmx4096m to allocate 4 GB of RAM and -xmx6144m for 6 GB of RAM (if your system has enough available RAM).
- After making the desired changes, press Ctrl+S to save the changes.
- Reopen Android Studio and check if the issues are resolved.
Be careful when making changes and make sure you don’t allocate more RAM than your system can handle.
Get your Android Studio up and running in no time
Android Studio is the first step in your development journey. So don’t let it get in your way! Applying these troubleshooting steps can easily overcome Android Studio not working issues.
Also, an incorrectly installed Android Studio is of course the start of crashes and errors. So, to avoid first step failure issues, you need to set up Android Studio properly.