Accepted answer

follow the steps to resolve the issue:

  • check your java version and remember it, use “java -version” in terminal
  • go to your android studio path installation
  • then in: Android Studio/jre/ open the file named “release”
  • take attention of the value of JAVA_VERSION field
  • if it’s not the same as the java version on your computer, just change it with the version installed on your computer.
Accepted answer

you are in Windows 10, set the JAVA_HOME environment variable to the JRE for Android Studio. For example:

C:\Program Files\Android\Android Studio\jre