Android Studio freezes/hangs when i try to open anything - java

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

Related

Some conflicts were found in the installation area, while updating android studio 3.0.1

I am getting this error while updating Android Studio 3.0.1 some patch gets downloaded and following error comes,
Some of the conflicts below do not have a solution, so the patch cannot be applied.
Showing File : jre/bin/java.exe is Absent
If anyone is still having this issue, here's what worked for me. I checked a bunch of other responses but nothing worked & I didn't want to do a clean install.
Not sure how it happened, but within my Android_Studio\jre\ was another jre version. So, I went into Android_Studio\jre\jre\bin\, copied the java.exe from there & pasted it into Android_Studio\jre\bin.
Similar solution to the other poster, but it had to come from a different directory, otherwise it'll just change from "Absent" to "modified" & continue to not work.
I had the same issue. I've just copied java.exe from jdk installed folder (e.g. D:\Program Files\Java\jdk1.8.0_144\bin\java.exe) to Android_Studio\jre\bin, and Android Studio had upgraded successfully.
Opened Android Studio again and choose update and restart option. Once the download is completed, the android studio is closed automatically and an update window appeared on the screen. At that time I opened the terminal and entered the following command:
ps -A | grep java
That command showed all the running java related processes. Now I killed those processes using the following command:
kill -9 PID
Replace PID with the corresponding process id.
I had the same error, solved in that way: I just reinstalled my current Android Studio version (without losing any settings, etc) and then tried to update again. Everything went fine after that.
The error is due to modification of java installed files. Download the latest android studio and reinstall it. The previous configuration can be restored during the reinstall over existing version.

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)...

Can't find SDK Manager in SDK file

I am being pestered by eclipse when I open the program. I get two error messages; "SDK Platform tools component is missing! ..." and "Failed to get the required ADT version number from the SDK. The Android developer toolkit may not work properly".
Both messages give me the option to open the Android SDK manager. When I attempt to open the Android SDK manager from eclipse, I get an initialization and then nothing happens.
I'm aware this is a common problem. Many solutions say to find the Android SDK manager in the SDK directory, though I can't find it anywhere there. The path I am using is "C:\Users\Ant\AppData\Local\Android\sdk".
When I attempt to open the SDK manager from Android Studio, I get something come up, though I have no idea if it is the Android studio version of the SDK manager or not.
All I want to do is install some packages to get everything running smoothly. I have the feeling that I need to open the SDK manager from eclipse to do it though. Is this correct? Is there anything else I can do?
You should go and create the proper environment setup, It seems there is a confusion between Eclipse and android studio working env. Please make sure to install separately the working env. SDK are normally hidden files make sure you are suppose to see hidden files in your computer.
Thanks,
Ashish

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 setup JDK error

In Android Studio I am facing bellow error
This popup shows when I press Alt+Enter for missing classes(symbols). When I click on setup SDK it shows two options
1.8(Java version "1.8.0_60")
Android API 23 Platform (Java version "1.8.0_60")
Nothing happens on selecting any of above options.
NOTE: My Java_Home path is correct and in android studio I have checked JDK path it's correct.
I am using Android Studio 1.5.0, Java 1.8 and windows 10
Simple Invalidate Cache and Restart doesn't work for me. So I have done following steps:
Check and verify Java path in Java_home variable
Start Android Studio and invalidate cache File--> Invalidate Cache and Restart
Start Android Studio and click File -> Invalidate Cache and Restart.
This has worked for me. Thanks
Well... In my case, setting up JDK in Project Structure didn't work. Invalidating and restart didn't work either. On further debugging, it led me to this:
Can-t-start-Intellij-after-update
Background of this problem:
I had installed Android Studio 3.6 and upgraded to Android Studio 4. Plugins like Mateial theme, Flutter, CSV viewer, JSON viewer etc weren't compatible with Android Studio 4. So I had disregarded those plugins after I upgraded to AS 4.
After some days, I got a notification that plugins which I had disregarded earlier were compatible with AS 4. So I installed those and restarted AS 4 and applied Material theme. I started to face problems like Set up JDK even though the path to JDK was proper.
So I closed AS 4, deleted caches from .gradle, .android, .AndroidStudio4.0\system\caches. Then I opened AS 4 and set up JDK error was gone.
Hope it helps...
P.S: If same problem persists, then I'm afraid that you've to unistall AS and download AS 4 directly and install it. I still can't figure out why it happened to me...
Close Android studio then again open it .
Go to File--> Invalidate Cache and Restart .
You are done.

Categories

Resources