HISTORY
Android Studio was installed successfully the first time during a walk through as part of a Flutter tutorial (including installing Git and Flutter)
Trying to launch Android Studio the second time produced the following error:
[Error launching Studio
If you already have a 64-bit JDK installed, define a JAVA_HOME variable in Computer > System Properties > System Settings > Environment Variables.
Failed to create JVM. JVM Path: C:\Users\Anthony.AndroidStudio4.0\jre\jre]1
RESEARCH
I've seen several YouTube videos addressing this that appear to be successful, but just don't work for me.
Video showing how to delete VMoptions file and check JAVA_HOME:
(my folders seem to be configured differently, but I have two VMoptions files in the bin and one in the AppData\Roaming\Google\AndroidStudio4.1 The one in AppData just contained a link to an Android support page, but the one in bin had a lot of data. It was deleted (first just the contained data within and later the file was deleted entirely)
Key points:
It seems that the issue is either with Android Studio or the Java JDK
JAVA
I've downloaded and installed Java JDK 13, and set the bin folder as the environment variable (both system variable and path) as shown in https://www.youtube.com/watch?v=IJ-PJbvJBGs
I've also tried with JDK 8 (legacy version) with the same results
ANDROID STUDIO
I've uninstalled and reinstalled Studio 4.1 and the same thing happens. I can't locate prior versions on their site.
COMPUTER Windows 10, i7, 32gb ram
value = "C:\Program Files\Android\Android Studio\jre"
Android studio 4.1, Flutter
Related
I've installed the newest version of Android Studio with the installer on my Windows 10, currently it's version 2021.3.1.17 Dolphin.
Upon launching it, the splash screen appears and the little bar loads to the end and then it gets stuck indefinitely on that screen. All I'm seeing is this:
I've tried the following stuff already:
Completely uninstalling Android Studio, making sure all the files have been removed correctly before re-installing it (except the JetBrains folder, since I have other JetBrains stuff in it)
Re-Downloading the installer from the official Android Studio Website to make sure it was not corrupted.
Run as Administrator.
Was previously installed on a non-primary drive D:/, and I've also tried installing it on my primary drive C:/ just in case, same issue with C:/ installation too.
Ran studio.bat to see any errors, however, I'm assuming that bat file itself is buggy. It tells me that it does not find any JRE or JDK installation within the path. So to fix it I've set the newest Oracle JDK19 as my JAVA_HOME and the /bin accordingly, however, the studio.bat will then continue a long java error which seems honestly unfixable, so I won't even bother posting it here. Me setting the path shouldn't even be necessary, as Android Studio comes bundled with a JDK... and it should be using that one anyway.
So I'm out of things to try. I cannot make it work. My only lead was the Java error, but according to some Google search, I shouldn't even have to deal with it as it comes bundled with Android Studio. Looking into the files, there is indeed a jre folder within the Android Studio installation. Is it not using that one? What could be the reason that it is not using it if that is the case?
So, I was able to fix it myself after trying a few hours more. I've had also other Java installations (Java JDK 8, JDK 19) that interfered somehow with Android Studio. I've uninstalled everything related to Android Studio and I've uninstalled every Java version I had.
Additionally, I've removed every reference to Java or Android Studio from all of my system and environment variables. Also removed a path to Android SDK that was within my system variables.
After rebooting and installing Android Studio, it worked. Haven't installed any Java version so far, so not sure if the issues will return if I install my Java versions again.
I've recently had to start developing a Micronaut project in Android Studio instead of IntelliJ IDEA Ultimate. I'd assumed that because they share the same base this would be fine but when I load up my project I get this (the project is held in the wsl filesystem and all development has been using WSL with IDEA):
14:07 Project [name] is using the following JDK location when running Gradle:
//wsl$/Ubuntu-22.04/usr/lib/jvm/java-11-openjdk-amd64
Using different JDK locations on different processes might cause Gradle to
spawn multiple daemons, for example, by executing Gradle tasks from a terminal
while using Android Studio.
More info...
Select a JDK
Do not show this warning again
It's unclear why this is happening, when I click 'Select a JDK', what is selected is the JDK installed on WSL that IntelliJ is using, likewise it is pointed at the same directory where my gradle properties is kept.
I'm not sure where to go with this, my guess would be maybe Android Studio is trying to run a gradle or java instance that's not the WSL one (I think it installs it's own alongside) and that's the issue but the settings would imply otherwise. Does anyone know what might be happening?
Thanks!
With the latest clean installation of Android Studio with all the recommended settings I have this continuous error when I try to start an emulated device. The device starts up correctly and works properly but the "adb.exe has stopped working" popups continue to appear if they are closed, furthermore it is not possible to link the device with Android Studio because it is not recognized. Even if I download a previous image of Android (Android 9.0) I have the same problem.
The only plugins installed are Dart and Flutter.
The question could be repeated but I did not find solutions for this problem, or rather, the solutions found did not allow me to close this problem.
Before this update everything was working properly.
In this case we speak of a clean installation.
When I try to start the "main.dart" application to install it on the device the only error that appears is "Error retrieving device properties for ro.product.cpu.abi:"
Android Studio 3.4.1 Build #AI-183.6156.11.34.5522156, built on May 1, 2019 JRE: 1.8.0_152-release-1343-b01 amd64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Windows 10 10.0
Android Debug Bridge version 1.0.41
Version 29.0.0-5611747
There is a temporary fix for now (if you're using Windows)!
1st Close Android Studio
2nd Open CMD and write: taskkill /f /im adb.exe
3rd Download this file: http://dl-ssl.google.com/android/repository/platform-tools_r28.0.2-windows.zip
4th Go to
C:\Users[your-username]\AppData\Local\Android\Sdk
and replace the "platform-tools" folder with the new one that you just downloaded.
ps: (a) don't forget to keep the backup (b) the AppData is a hidden folder
I uninstalled my older version of android studio (1.4.1) which was working properly (this installation was done a long time ago, and ADK and android studio were installed separately, in fact if I remember correctly I had the ADK installed for use with Eclipse, and I just updated paths in Android Studio to point to that location to use ADK for Android Studio )
I installed android-studio-bundle-162.4069837-windows.exe which apparently comes with both IDE and ADK
However after installation, Android Studio just doesn't start up
I have already added both JDK_HOME and JAVA_HOME to environment variables and the problem is the same
Double clicking on studio.exe studio.exe to get launched (I can see it in the Task Manager for a while) then it just closes (no error message, no IDE splash screen, nothing at all; in fact, if I wasn't looking at the task manager I wouldn't even know if anything was happening)
Computer setup:
Windows 7 service pack 1 32 bit
Android Studio is installed at
C:\Program Files\Android\Android Studio
studio.exe is in
C:\Program Files\Android\Android Studio\bin
Contents of studio.exe.vmoptions
#
# *DO NOT* modify this file directly. If there is a value that you would like to override,
# please add it to your user specific configuration file.
#
# See http://tools.android.com/tech-docs/configuration
#
-server
-Xms256m
-Xmx750m
-XX:ReservedCodeCacheSize=240m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-da
-Djna.nosys=true
-Djna.boot.library.path=
-Djna.debug_load=true
-Djna.debug_load.jna=true
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-Didea.paths.selector=AndroidStudio2.3
-Didea.platform.prefix=AndroidStudio
-Didea.jre.check=true
Location of Java:
C:\Program Files\Java\jdk1.7.0_25
I installed android-studio-bundle-162.4069837-windows.exe
android-studio-bundle-162.4069837-windows.exe is for 64-bit OS, whereas, you need to download and install the one with android-studio-ide-162.4069837-windows32.zip
As you can see here: https://developer.android.com/studio/index.html#downloads
Meaning that, the one you are stating that the one you downloaded targets to: Android Studio Windows 64-Bit [Top link in the table]
Whereas, you need to download and install the one which is: Android Studio Windows 32-Bit [4th link from top in the table]
Also, if you look closely, it is explicitly stated that the one you downloaded is 64-Bit & has -bundle suffix & .exe extension, which also includes Android SDK, but the one your PC supports explicitly has -ide suffix & .zip extension. Included: No Android SDK, no installer
Recently (after install Android Studio 2.3.x, I'm now at 2.3.1) the emulator won't start in Android Studio.
I can run the emulator from the command line if it is in the SDK\tools directory.
If I run the emulator from a directory other than the SDK\tools directory I get an error like this:
[12236]:ERROR:./android/qt/qt_setup.cpp:28:Qt library not found at ..\emulator\lib64\qt\lib
Could not launch '..\emulator/qemu/windows-x86_64/qemu-system-i386.exe': No such file or directory
The tools and platform-tools directories are in my path. Android_home is set correctly. First I tried re-installing the emulator from the SDK manager in Android (now that the standalone SDK manager is gone I can't do it there). I manually downloaded the SDK and installed it overtop of the old SDK. I then tried putting it in a new directory and changing the ANDROID_HOME and updating my paths and changed the setting in Android Studio (and all the local.properties files). Next I completely uninstalled Android Studio and SDK, rebooted and reinstalled Android Studio. Still having the same problem.
I've tried the suggestions here in the question here: Emulator on Android Studio doesn't start after SDK tools update to 25.3.1 by copying various directories (first sym-links then copy directories as sym-links work differently on windows).
I've tried all the suggestions here: https://issuetracker.google.com/issues/37137213 as well.
I've re-installed HAXM, but I don't think it is an Emulator problem as it does work when I start it from a command prompt in the tools directory.
Any suggestions?
Details:
Windows 10 (Build 1703)
Android Studio 2.3.1
I've resolved the problem in this way:
in command line, from the folder containing avd images, I've run the emulator.exe against a virtual device image using the switch -gpu swiftshader.
To be precise, in my case, in command line, from the folder C:\<Users>\.android\avd I've typed
<android sdk folder>\emulator\emulator.exe #Nexus_4_Lollipop -gpu swiftshader
where Nexus_4_Lollipop is a name of the avd image.
Changing Graphics settings from "Automatic" to "Software - GLES 2.0" in Virtual Device Configuration worked for me. I think it's the same as "-gpu" command line option, but not all modes available: https://developer.android.com/studio/run/emulator-acceleration.html