Android Studio occasionally doesn't start

Viewed 218

I used to have only the stable version of AS installed (AS 4.0), and occasionally it wouldn't start. It would show it's loading screen, but then that's it. If I hover over the AS icon in the status bar, it shows a blank (white) screen. It will however present the 'tips' window. I had to uninstall/reinstall it, which sometimes took several tries until successful. This would fix the problem, but is not a solution.

Now I have the preview beta installed side by side (AS 4.1-beta4), and it is that version that occasionally has problems starting, and the stable version has interestingly become, well, stable.

I have my JAVA_HOME environment variable as: C:\Program Files\Android\android-studio\jre\bin and added a second one just now just in case: C:\Program Files\Android\android-studio-preview\android-studio\jre\bin

I had a JDK_HOME variable as well, but deleted it after I read it was redundant. It didn't change anything. I'm using Windows 10

Update: I now notice this problem occurs only when a specific project wasn't closed properly due to the computer's battery running out or a Windows crash. Should I delete one of the folders or files in order to 'reset' the project for a clean Android Studio build?

3 Answers

If Your operating system is Windows then try to change JDK (Sun, OpenJDK) etc. and for other operating system download stable version with jdk and create desktop icon permanently don't run from terminal.

You could be running into a Java running out of memory while AS loads. To change the available memory that AS can allocate, perform the following steps:

  1. Open AS successfully
  2. From the main menu, select Help | Change Memory Settings
  3. Increase the maximum amount of memory that you want to allocate (try doubling it) and then click Save and restart.

This should rule out any JVM heap issues

Deleting the .idea folder caused Android Studio to rebuild the project and open correctly.

Related