Android Studio (version 2022.1) Unable to find bundled Java version - android

I have been struggling facing that problem in Android studio using Flutter.
Any solution for that issue?
I am using Windows 10 and tired of searching for that problem and fixing it.

If you installed Android Studio Electric Eel | 2022.1.1
For Windows Users,
Open the terminal and open to the android studio directory
Like,
cd C:\Program Files\Android\Android Studio
Then,
mklink /D "jre" "jbr”
copy the content of jbr and paste the content into jre folder
To resolve the issue after completing the above change, just create a sym link jre -> jbr.
run doctor this commend ‘flutter doctor’ again and the problem is solved.

Follow these steps.
Go to C:\Program Files\Android\Android Studio
Go into the jbr file, copy all of them and paste them into the jre file
Run flutter doctor.

Related

Why "Failed to load JVM DLL"?

I updated android studio from Dolphin to Electric Eel and now it won't start, giving the following error message:
Failed to load JVM DLL C:\Program Files\Android\Android Studio\jbr\\bin\server\jvm.dll
If you already have a JDK installed, define a JAVA_HOME variable in Computer > System Properties > System Settings > Environment Variables.
I already have JAVA_HOME set but tried different paths, different java versions, uninstalling, installing, etc.
Tried deleting all the caches I could find (probably missing something).
Tried uninstalling android studio multiple times, or going back to the older version and updating again.
While on the older version - tried to change the JDK that the studio was using and then update.
Nothing of the above works.
After some Windows updates, I faced the same problem. Download a fresh copy of JetBrainsRuntime and replace the C:\Program Files\Android\Android Studio\jbr folder with this new one.
Edit:
There's a workaround mentioned here. It worked for me.
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.
Old answer:
I "solved" it by deleting the jvm.dll file in C:\Program Files\Android\Android Studio\jbr\bin\server.
Then it started actually looking up the JAVA_HOME variable and the studio launched.

Update Android Studio 4.1.2 to 2020.3.1 failure

I'm trying to update Android Studio 4.1.2 to 2020.3.1, update fails and suggest to read idea_updater.log. Here's the dialog box prompted during update:
The only relevant error I can found is this one:
03/08 13:57:57 INFO DeleteAction.doApply - Delete action. File: C:\Program Files\Android\Android Studio\jre\jre\bin
03/08 13:57:57 INFO DeleteAction.doApply - Delete: C:\Program Files\Android\Android Studio\jre\jre\bin
03/08 13:57:57 ERROR Patch.apply - apply failed
java.io.IOException: Cannot delete: C:\Program Files\Android\Android Studio\jre\jre\bin
at com.intellij.updater.Utils.tryDelete(Utils.java:115)
at com.intellij.updater.Utils.access$000(Utils.java:12)
at com.intellij.updater.Utils$1.postVisitDirectory(Utils.java:77)
at com.intellij.updater.Utils$1.postVisitDirectory(Utils.java:68)
at java.nio.file.Files.walkFileTree(Files.java:2688)
at java.nio.file.Files.walkFileTree(Files.java:2742)
at com.intellij.updater.Utils.delete(Utils.java:68)
at com.intellij.updater.DeleteAction.doApply(DeleteAction.java:71)
at com.intellij.updater.PatchAction.apply(PatchAction.java:213)
at com.intellij.updater.Patch.lambda$apply$3(Patch.java:406)
at com.intellij.updater.Patch.forEach(Patch.java:454)
at com.intellij.updater.Patch.apply(Patch.java:399)
at com.intellij.updater.PatchFileCreator.apply(PatchFileCreator.java:116)
at com.intellij.updater.Runner.install(Runner.java:381)
at com.intellij.updater.Runner._main(Runner.java:180)
at com.intellij.updater.Runner.main(Runner.java:41)
Caused by: java.nio.file.FileSystemException: C:\Program Files\Android\Android Studio\jre\jre\bin: Impossibile accedere al file. Il file è utilizzato da un altro processo.
at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:86)
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
at sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:273)
at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103)
at java.nio.file.Files.delete(Files.java:1126)
at com.intellij.updater.Utils.tryDelete(Utils.java:89)
... 15 more
it seems that it's unable to remove C:\Program Files\Android\Android Studio\jre\jre\bin folder since it's locked from another process.
At the moment the error dialog appear the folder cited above is empty (before update holds 55 files and 3 folders).
But AFAIK there are not other processes trying to use any resource in Android Studio while the update is running.
Tried several times with the same result. Any hints? Should I remove Android Studio and try a fresh new install?
Download a fresh JRE and install it to another folder NOT below your android studio folder
for latest openJDK as of date (my favorite), download it here
restart windows in safe mode
delete the c:\program files\android\android studio\jre and its subfolders
restart windows to normal mode
run Android studio and pick the fresh JRE folder you've just installed
try the update again
I've not been able to find any lock on such folder. I needed to uninstall 4.1.2 and reinstall 2020.3.1 (everything worked).

android studio not starting java.lang.NoSuchMethodError

i get this error when starting android studio
java.lang.NoSuchMethodError: com.intellij.ide.plugins.PluginManagerCore.loadDescriptors()[Lcom/intellij/ide/plugins/IdeaPluginDescriptorImpl;
at com.a.a.b.b.ar.a(ar.java:121)
at com.a.a.b.b.ar.a(ar.java:71)
at com.intellij.idea.MainImpl.start(MainImpl.java:19)
at com.intellij.idea.StartupUtil.startApp(StartupUtil.java:303)
at com.intellij.idea.StartupUtil.prepareApp(StartupUtil.java:245)
at com.intellij.ide.plugins.MainRunner.lambda$start$0(MainRunner.java:47)
at java.lang.Thread.run(Thread.java:748) .... JRE 1.8.0_242 release-1644-b3-6222593 amd64 by JetBrains s.r.o ***/opt/android-studio-ide-201.6858069-linux/android-studio/jre/jre
my operating system is ubuntu 20.04 LTS 64bit
I first encountered this issue after updating my Android Studio to 4.0.1 allbeit on a MacOS.
To fix this issue, please take the following steps:
Go to the directory ~/Library/Application Support/AndroidStudio
You would find marketplace folder in this location.
Rename this folder and attempt starting Android Studio again.
When Android Studio starts up again, go to Android Studio -> Preferences
Goto Plugins and click installed.
The incompatible plugins would surface at this stage. Click delete/uninstall for these plugins.
Restart the IDE and all should be perfect.
That error indicates an issue in IDE plugins.
Remove the Android Studio folder in ~/.local/share/Google/.
This should fix your issue.
I had the same problem on my machine. It was solved by deleting the plugins folder located in .local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-0/201.6953283.plugins/marketplace. Note that 201.6953283 was my current version of Android Studio.
You can use the canary build until Google releases v4.2. This worked for me. Just open software install and search for "android studio canary."
I ran into this issue after upgrading from Android Studio 4.0.1 to 4.1.1, but solved it by deleting some plugins under the directory ~/.local/share/Google/AndroidStudio4.1. The plugins I deleted were:
idea-multimarkdown
Gauge-Java-Intellij
markdown
marketplace
i dont know what cause this issue but run it as sudo solve it .
your installation directory is /opt so run this command on terminal
sudo ./opt/androidStudioDirectory/bin/studio.sh

Android Studio SDK Cannot Be Downloaded

I am new to Android Development and I need help with the installation process with the following error code. I have tried a clean installation of Android Studio many times but the error pops up every time.
Can anyone help?
Here is a temporary solution, skip components downloading when open Android Studio
install android studio.
do not start studio after installation completed.
go to C:\Program Files\Android\Android Studio\bin
you will find idea.properties file
write this line at the end of the file disable.android.first.run=true
run android studio
After open android studio you can install needed components from SDK Manager
There are some more solutions on this link which you can try.

How to settup android studio in ubuntu 12.04?

I downloaded android studio for ubuntu 12.04. but i don't know how to put JAVA_HOME and how to open studio for developing apps. please help me.
You can open your Android Studio by navigating to main-directory/bin through Terminal and then on the next line open studio.sh using the command ./studio.sh . For example if you installed Android Studio in Downloads, you have to write in Terminal cd Downloads/android-studio/bin and after confirming the second line should be ./studio.sh. I think in Android 0.8(beta) they still didn't fix that issue where you can't open your Studio through the icon.

Categories

Resources