1

I tried to use the terminal of Android Studio and error below popped up.

ERROR: JAVA_HOME is set to an invalid directory: jdk1.8.0_131

Please set the JAVA_HOME variable in your environment to match the location of your Java installation.

I made sure that jdk1.8.0_131 is in C:\Program Files\Java, also no ; or /bin at the end of command line as its seen....

could you help to solve this problem?

Community
  • 1
  • 1
TikChiku
  • 365
  • 2
  • 6
  • 12
  • You need to set java_home enviroment variable, that's why you are getting the error, it doesn't matter where java folder is you need to add java_home to your enviroment variables. – Chris Gomez Sep 22 '17 at 13:21
  • I see...like follow these steps? Right-click the My Computer icon on your desktop and select Properties. Click the Advanced tab, then click the Environment Variables button. Under System Variables, click New. Enter the variable name as JAVA_HOME. Enter the variable value as the installation path for the Java Development Kit. Click OK. Click Apply Changes. – TikChiku Sep 22 '17 at 13:35
  • Yes, you need to follow these steps. – Chris Gomez Sep 22 '17 at 13:37
  • got it, thank you sir! – TikChiku Sep 22 '17 at 13:40

0 Answers0