Error launching Android Studio: path error for JAVA_HOME - android-studio

---------------------------
Error launching Android Studio
---------------------------
The environment variable JAVA_HOME (with the value of
C:\Program Files\Java\jdk1.8.0_05\bin;)
does not point to a valid JVM installation.
---------------------------
OK
---------------------------
Sorry, but, where JAVA_HOME must point to ?

Please check http://docs.oracle.com/cd/E19182-01/820-7851/inst_cli_jdk_javahome_t/index.html
It should point to C:\Program Files\Java\jdk1.8.0_05

Related

JAVA_HOME is set to an invalid directory Android Studio Flutter

type here
Since the last update of android studio to Electric Eel 2022.1.1,
I'm facing this issue while running my flutter project on my phone:
Launching lib\main.dart on Redmi Note 8 Pro in debug mode...
Running Gradle task 'assembleDebug'...
ERROR: JAVA_HOME is set to an invalid directory: C:\Program Files\Android\Android Studio\jre
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
Exception: Gradle task assembleDebug failed with exit code 1
And JAVA_HOME variable was sat on 'C:\Program Files\Android\Android Studio\jre'.
I've tried all possible solution that I've looked for but none of them worked.
It seemes the problem is related to the latest version of Android Studio.
What is the issue and how to solve it.
For Windows:
The problem is because of trace of old Android Studio java folder, just delete this folder and it starts working:
C:\Program Files\Android\Android Studio\jre
The new Android Studio Electric Eel is using jbr, not jre.
For macOS:
If you are using macOS replace the path in .bash_profile or .zshrc
export JAVA_HOME="/Applications/Android Studio.app/Contents/jre/Contents/Home"
with
export JAVA_HOME="/Applications/Android Studio.app/Contents/jbr/Contents/Home"

Error launching Studio Failed to create JVM

This my error launching studio
Error launching Studio
I already set JAVA_HOME
JAVA_HOME
Thank you

Android Studio - Error launching Studio JVM DLL Failed to load

I am trying to launch Android Studio but i get the following error:
Error launching Studio - Failed to load JVM DLL C:\Program Files\Android\Android Studio\jre\jre\server\jvm.dll If you already have a 32-bit JDK Installed, define a JAVA_HOME variable in Computed > System Properties > System Settings > Environment Variables.
Installation was without errors. OS is Windows 10 Pro
Simply try to run your Android Studio as administrator.
I had the same problem.
Try:
set environment variable JAVA_HOME for your JDK as C:\Program Files\Java\jdk(your version). (C:\Program Files\Java\jdk-17.0.5 for me)
Run Android studio as administrator.
remove file .vmoptions from path android studio/bin (
https://intellij-support.jetbrains.com/hc/en-us/community/posts/360005146240-Error-Launching-Idea-Java-Home-
)
This point really help for me: install it! https://learn.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170

Invalid Gradle JDK configuration found: Android Studio

When Launching the Android Studio getting this exception every time and project is not run.
Error:Invalid Gradle JDK configuration found. Open Gradle Settings
Platform SDK does not point to valid JDK (/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home)
You need to edit your project structure to point to a valid JDK location.
From File -> Project Structure
Set SDK Location -> JDK location to a Valid JDK Location like C:\Program Files\Java\jdk1.7.0_75
I was having same kind of problem with my machine which has program files located on the network and Java_Home environment variable was pointing to the program files location which was on the network. I installed a local Java JDK and defined the JDK path in Java_Home environment variable. This worked for me.

Android Studio Launch Error

I am trying to launch Android Studio but I get the following error:
"The environment variable JAVA_HOME (with the value of C:\Program Files (x86)\Java\jdk1.8.0_05\bin) does not point to a valid JVM installation."
Yet I know it does. Does anyone know what the problem is?
remove the \bin from your enviroment variable JAVA_HOME
If this fails, retry with a 64-bit jdk. You have a 32-bit (x86) currently installed.
JDK Download
Go to system properties then Advanced system settings Cick bellow Enviroment variables in system variables click New and input variable name JAVA_HOME and variable value java path, (example: C:\Program Files\Java\jdk1.8.0)
go to this path
Computer > System Properties > System Settings > Environment
Variables.
Create new system path named as JAVA_HOME
path will be
C:\Program Files\Java\jdk1.8.0_141
save it.

Resources