Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android studio AUTOMATICALLY closes

I installed android studio in windows 7 but it just closes immediately after opening. I've installed java jdk also and added a JDK_HOME environment variable But android studio closes itself after few seconds.

like image 483
Brock Avatar asked Jul 21 '15 06:07

Brock


People also ask

Why are my apps closing automatically Android Studio?

Apps on Android can crash because of low storage space, too many apps running simultaneously, a weak internet connection, or not having the proper app updates installed.

Why does Android Studio keep stopping?

An Android app crashes whenever there's an unexpected exit caused by an unhandled exception or signal. An app that is written using Java or Kotlin crashes if it throws an unhandled exception, represented by the Throwable class.


2 Answers

Figured it out! I'm sure someone will run into this in the future, so here goes.

Even though it found my JDK during installation, it wasn't able to find it when I was trying to open it, for some reason. Simple fix. Add a JDK_HOME environment variable to your system variables. It should contain the path to your JDK's ROOT directory. i.e. c:\Program Files\Java\jdk1.7.0_21\

source link

Answer-2

see this link also link2

like image 93
Bala Saikrupa Puram Avatar answered Nov 11 '22 17:11

Bala Saikrupa Puram


I have two versions of JDK installed on my computer and get the same problem. x64: C:\Program Files\Java\jdk1.8.0_91 x86: C:\Program Files (x86)\Java\jdk1.7.0_55

Solved by pointing the JDK_HOME to x86 path.

like image 2
Khachatur Avatar answered Nov 11 '22 16:11

Khachatur