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.
C:\Program Files\Android\Android Studio\jre