Why is Android Studio not opening for me? [duplicate] - java

This question already has answers here:
Android studio isn't opening on Windows
(28 answers)
Closed 1 year ago.
I have the JDK downloaded as well, and every forum I've seen this question asked on says to add the variable JDK_HOME or JAVA_HOME and I've tried both but it still doesn't open.
I've reinstalled Android Studio and restarted my computer but it isn't opening. I'm getting the loading icon like this but it's just stuck on that.
I'm running Windows 8.1 and I have installed the most recent version of the JDK. Was really excited to start coding and any help or suggestions would be appreciated.

Though the question was raised long back but posting the answer to help someone stuck in the recent days,
as I was able to resolve the same issue 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

Try to download the android studio bundle version that has everything you want including the SDK. Set the environmental variable and you are good to go!

Open cmd and type "java -version"
Make sure that you have java on your pc. If not, try to install it from here http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Related

Android Studio freezes/hangs when i try to open anything

Recently I upgraded my Android Studio to 3.1 and also my gradle to 4.4.
Since then android studio doesn't let me open anything. (Any project , any file location, etc). I am able to create a new project but if try opening an existing one it just freezes. And then I have to kill it through Task Manager.
I am also able to open the settings page through welcome wizard. There also I tried to change the gradle version manually, again while browsing to the location it just gets hanged. Same way as above
I tried upgrading the Java version, installing/uninstalling android studio and everything else I can but its the same.
Any help or suggestions will be appreciated
I encountered similar issue. Please check the system Environment Variable, the JAVA_HOME path should be set correctly according to Java installed in your PC; something like this in my PC "C:\Program Files\Java\jdk1.8.0_172"
This resolved the issue for me.
Cheers!
Herbs

Why JDK location can't change on Android Studio 3?

I was working on android studio. In this time I open another java software. After this my studio show below error.
If I open JDK setting and change the jdk location, it change but not save. If I restart studio the default location come again and show the error.
I don't find any help on google and youtube. Please anyone help me.
If you unceck the box "Use embedded JDK (recommended)" it should allow you to set a path to JDK manually. Please post back if there are any other issues.
However, I'd recommend you let Android Studio install its own JDK where it wants it, and then you install a separate one (or even better, make the other programs go look for JRE under the android studio path)...

Android Studio Won't Launch on Windows 10

I recently got a new machine and Windows 10, which I've never used. I'm going through the process of re-installing all of my app development software, which includes Git, Java 7, and Android Studio.
I was under the impression that everything installed fine, but I can't actually launch the IDE itself. The launcher is fine and I can go through the steps of creating a project, but whenever I click finish, the screen closes and nothing happens.
I wish I could give more details but that's really all that happens.
Any advice on how to troubleshoot this issue?
Some of my theories:
1) Android Studio doesn't seem to like spaces in path names and gives me warnings when creating projects and installing tools. That seems like a silly issue but it's not impossible I guess. It doesn't like "Program Files" or my username which is my full name, but Windows 10 by default names accounts "FirstName Lastname" and I can't seem to change the username to a string without a space.
2) Android Studio is not detecting Java (7). Perhaps it got the wrong location for the Java SDK since I installed them at the same time? Other people seem to have encountered a similar issue, but I would think that I at least get an error.
3) It's just some dumb tiny bug and I have to reinstall Android Studio.
Any help is appreciated, I want to get to work.
Java 7 is outdated. Download the java 8 JDK. http://www.oracle.com/technetwork/pt/java/javase/downloads/jdk8-downloads-2133151.html
Set your java path variables accordingly.Environment variables for java installation
Make sure you downloaded and installed the version of android studio
that included the SDK, if not download it separately. https://developer.android.com/studio/index.html#downloads
Set your path variables accordingly. Android Studio - How to Change Android SDK Path

Android Studio didn't start. Shows issue like "tools, extra-android-m2repository and 6 more SDK components were not installed"

I tried to start Android Studio from cmd line, but show issue like "tools, extra-android-m2repository and 6 more SDK components were not installed". I think there is some problem with the jdk. I even tried to change proxy settings in other.xml, but it opened the Android Studio window , but I cannot able to create or import any new projects. People guide me.
Go to Help and Check for update it will automatically update the required packages and your problem will be solved.
Go to the Android SDK-folder and open SDK Manager.exe, from there you can install all the needed packages (Mostly they are already selected).

Android Studio - Can't open AVD/SDK

Sorry if this is the wrong Stack Exchange, but this is where most of the questions were asked when I googled my problem.
For some time now I've been having problems with Android Studio and the AVD/SDK. It seems to be a relatively common problem, but I haven't been able to fix my problem with any of the solutions that worked for everyone else. This is the error I'm getting whenever I try and run the AVD or the SDK:
Cannot launch AVD manager.
Output:
Access is denied.
ERROR: No suitable Java found. In order to properly use the Android Developer
Tools, you need a suitable version of Java JDK installed on your system.
We recommend that you install the JDK version of JavaSE, available here:
http://www.oracle.com/technetwork/java/javase/downloads
If you already have Java installed, you can define the JAVA_HOME environment
variable in Control Panel / System / Avanced System Settings to point to the
JDK folder.
You can find the complete Android SDK requirements here:
http://developer.android.com/sdk/requirements.html
I've tried re-installing everything Java (Both JRE and JDK), reinstalling Android Studio, running as admin, configuring permissions and a bunch of other stuff. I'm running Windows 7 and I've tried both JDK/JRE 6, 7 and 8 (JDK 6 worked very poorly though). I don't really know what kind of information you need to help me solve this problem, but I'll supply any information needed as fast as I can. Thank you very much.
Edit:
Please note that Java IS installed. Both Java and Javac is working fine in cmd.
I can suggest that Go to Windows -> Preference -> Java -> Compiler
And try with different java version.
Probably your Java folders are in the path (and that's why they work from CMD) but your JAVA_HOME is not defined.
As you are on Windows try creating a System Variable following those steps
Try (re)installing the ADT and see if it works. If not, go to the sdk's root folder ([PATH TO THE UNZIPPED ADT]/sdk) and open the AVD Manager.exe. Does it still give you the same error? If not, try to open the SDK Manager.exe and make sure you've installed all the propper APIs. I'd recommend installing at least the SDK Tools and Platfom-tools, and all of API19 (Android 4.4.2).
Finally Solved my problem! Some software I had previously installed had created a Path in User Variables, which was the one I was using for my JDK path. I tried using the Path in System Variables and it worked just fine! Thanks to everyone who took time to help me.

Categories

Resources