failed to load jvm dll android studio Electric Eel - android-studio

I was trying to install Android Studio Electric Eel on a laptop but after installation when I'm trying to open this error comes,
failed to load jvm dll android studio
I already,
Added JAVA_HOME in system variables,
Added path of Java bin folder,

try this, it's worked for me
just delete the jre folder and it starts working(restart android studio)...
C:\Program Files\Android\Android Studio\jre
The problem is because of traces of old Android Studio java folder,The new Android Studio Electric Eel is using jbr, not jre.

You also need to add your bin directory path in path System Variable
Edit System Variables and add your path as follow

Related

Why is android studio not opening?

I try to open android studio but it says
Failed to open JVM DLL if you have JDK installed set JAVA_HOME variable....
I set the JAVA_HOME variable, downloaded new jdk
set it to that and redownloaded android studio but nothing is working.
It says to install Microsoft Visual C++ Redistributable
Installing it provides a "missing vcruntime140_1.dll file in bundled Java Runtime" to the Android Studio.
read - https://issuetracker.google.com/issues/247854802?pli=1
buddy hopes you are doing great this crash happens when an awful java path is changed or deleted.
This same error I already faced when the new update I downloaded to Android Studio Electric Eel | 2022.1.1
To solve this you need to change the path from the environment or you should delete the old java and download the new JDK and give the path.
You should follow this answer: https://stackoverflow.com/a/27113946/19674027 for better understanding
Happy Coding...

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"

Android studio is not opening AFTER changing studio64x.exe.vmoptions or deleting it

I have changed studio64x.vmoptions file to make studio faster but ever since I made change, android studio is not opening. it shows error about JAVA_HOME environment variable but I already have added that. please help!
tried reinstalling android studio, adding Java_Home , deleting studio64x.exe.vmoptions. still not opening
I was able to resolve the same issue (Android Studio was not opening) by refer to the solution provided in Android Developer Portal,
Studio doesn't start after upgrade
If Studio doesn't start after an upgrade, the problem may be due to an invalid Android Studio configuration imported from a previous version of Android Studio or an incompatible plugin. As a workaround, try deleting (or renaming, for backup purposes) the directory below, depending on the Android Studio version and operating system, and start Android Studio again. This will reset Android Studio to its default state, with all third-party plugins removed.
For Android Studio 4.1 and later:
Windows: %APPDATA%\Google\AndroidStudio Example: C:\Users\your_user_name\AppData\Roaming\Google\AndroidStudio4.1
macOS: ~/Library/Application Support/Google/AndroidStudio Example: ~/Library/Application Support/Google/AndroidStudio4.1
Linux: ~/.config/Google/AndroidStudio and ~/.local/share/Google/AndroidStudio Example: ~/.config/Google/AndroidStudio4.1 and ~/.local/share/Google/AndroidStudio4.1

Is JDK 8 really important for Android Studio?

I recently installed Android Studio 2.3.3 on my Mac, but I forgot to install JDK 8 before setting up Android Studio. I am already halfway through the development process of my App, so know I don't want to uninstall Android Studio, then install JDK 8 and again reinstall Android Studio, so should I uninstall Android Studio for JDK 8, is it really that important?
First thing, JDK is important in Android Studio to compile your .java files. As you said you are half way through your development process ,there is a JVM in your machine(not necessarily JDK-8).
Android by default installs a JVM in your computer.
Open a project in Android studio,
Goto File -> Project Structure -> SDK location
There you can see, default JDK location, if there is no such thing then,
1.install JDK-8, and Set the Environmental variables.
2.Set the jdk path in the JDK location in the android studio.

Can't find Java 7 in Android Studio

Android Studio says that I have to download Java 7. I dowloaded it and installed it but Android Studio can't locate it. How do I make Android Studio aware of my Java install?
Find JDK Installation Directory
First you need to know the installation path for the Java Development Kit.
Open the default installation path for the Java Development Kit
C:\Program Files\Java
There should be a subdirectory like
C:\Program Files\Java\jdk1.7.0_10
Adding Path to Android Studio
Open your AS and go to File->Project Structure
Then paste the directory path where it says "JDK location"

Resources