Android Studio Update stuck cleaning up? - android

I just downloaded and installed Android Studio 0.8. When I ran it, I received a notice that there was an update. I immediately downloaded the patch and it auto-ran. After patching, the dialog titled "Update" appears to be stuck with the following prompt:
Updating Android Studio (build 135.1245622) to Android Studio
(build.135.1248636)
(progress bar animation)
Cleaning Up
If I click on the Cancel button, I get a new Yes/No dialog box saying:
The patch has not been applied yet.
Are you sure you want to abort the operation?
How can I fix this problem?
Running on Windows 8.1
JDK version 1.8.0_05

I've also experienced this with the latest updates (0.8.1 - 0.8.4), both in Windows 7 and Windows 8.1, but there's actually nothing wrong.
The "Cleaning Up" part takes an amazingly long time (literally, several minutes), but it finishes OK. You just need to wait. :)
Very surprising for what would seem to be such a small update (at least judging from the downloaded file size).

It took an hour for the "cleaning up..." step to finish on my Windows 8 machine. For whoever still has this problem, I don't know if it's a coincidence, but it finished 1 minute after I closed all my other open applications (e.g. browser).

I had the same issue while updating to version 0.8.2
The update froze at the 'cleaning up' screen. It was very late, so I let it run while I watched tv and fell asleep. Next morning I started my computer and the update screen was still there :O So I found this forum and did everything you guys said, but nothing seemed to work for me. I cancelled the update and got a Java IOException. It said that the update couldn't delete files and or folders inside the Temp folder of the LocalAppdata dir (C:\Users[UserName]\AppData\Local\Temp). I logged out and logged in again and started Android Studio. Everything ran fine and the update was succesfully applied.
So if someone experiences this too and the update freezes for longer than 1 hour, you can try to abort it, log out and log in again. And maybe it works again.

I believe this is to do with this, but I could be wrong:
On some Windows systems, the launcher script does not find where Java is installed. If you encounter this problem, you need to set an environment variable indicating the correct location.
Select Start menu > Computer > System Properties > Advanced System Properties. Then open Advanced tab > Environment Variables and add a new system variable JAVA_HOME that points to your JDK folder, for example C:\Program Files\Java\jdk1.7.0_21.

The problem has occurred for me for the last few updates, including the update to 0.8.4.
I'm on Windows 8.1 pro 64 bit.
I kill the cleanup window after a few minutes using Task Manager. I restart Android Studio, everything works as usual, and I can see the new update version number in Help > About (0.8.4 in this case).
This is listed in the Android Open Source Project - Issue Tracker - Updater from 0.8.1 hung on Cleaning Up
This issue is now fixed for me going from 0.8.4 to 0.8.5, as detailed at Issue 73989: Patch updating Studio fails on Windows because it cannot delete files
Note specifically that I attempted to delete all files in C:\Users****\AppData\Local\Temp\ manually.
I couldn't delete
"C:\Users****\AppData\Local\Temp\idea.updater.2226438342747264268.tmp\temp.4196595786233368387.tmp\lib\openapi.jar"
... until I restarted Windows.
So some mysterious lock on a file like that might be reproducing the problem for others.

Related

Android Studio 4.1.1 "Cannot access android.app.Activity" on Windows 10

I have just downloaded AS 4.1.1 and created a new project with "Empty Activity", left the default name and Minimum SDK with defaults.
I get the error in the subject. this is the view of the project:
I made absolutely no change. For the fun of it, I tried "Make project". Nothing happens, no output window to show the build progress/errors, like you would see in most IDEs.
Thanks for your help,
Michel
SOLVED. At first, I upgraded from 3 to 4.1.1. Then I uninstalled AS 4.1.1 and downloaded a fresh install. Still the problem persisted.
I uninstalled again, but this time, I searched for anything Android-related stuff and deleted it, including the SDK under %APP_DATA%\Local\Android\Sdk.
When I re-installed, it prompted me for SDK installation. Selected the SDK and finished installation.
I re-created the application and the error is now gone.
Frankly, I pity the newbie to which this could happen.

Android Studio occasionally doesn't start

I used to have only the stable version of AS installed (AS 4.0), and occasionally it wouldn't start. It would show it's loading screen, but then that's it. If I hover over the AS icon in the status bar, it shows a blank (white) screen. It will however present the 'tips' window. I had to uninstall/reinstall it, which sometimes took several tries until successful. This would fix the problem, but is not a solution.
Now I have the preview beta installed side by side (AS 4.1-beta4), and it is that version that occasionally has problems starting, and the stable version has interestingly become, well, stable.
I have my JAVA_HOME environment variable as: C:\Program Files\Android\android-studio\jre\bin and added a second one just now just in case: C:\Program Files\Android\android-studio-preview\android-studio\jre\bin
I had a JDK_HOME variable as well, but deleted it after I read it was redundant. It didn't change anything. I'm using Windows 10
Update:
I now notice this problem occurs only when a specific project wasn't closed properly due to the computer's battery running out or a Windows crash. Should I delete one of the folders or files in order to 'reset' the project for a clean Android Studio build?
If Your operating system is Windows then try to change JDK (Sun, OpenJDK) etc. and for other operating system download stable version with jdk and create desktop icon permanently don't run from terminal.
You could be running into a Java running out of memory while AS loads. To change the available memory that AS can allocate, perform the following steps:
Open AS successfully
From the main menu, select Help | Change Memory Settings
Increase the maximum amount of memory that you want to allocate (try doubling it) and then click Save and restart.
This should rule out any JVM heap issues
Deleting the .idea folder caused Android Studio to rebuild the project and open correctly.

"The following SDK components were not installed: sys-img-x86-addon-google_apis-google-22 and addon-google_apis-google-22"

I'm Windows 7 64-bit user and I got Android Studio problem after I update the latest version of Android Studio and SDK components..
The following SDK components were not installed: sys-img-x86-addon-google_apis-google-22 and addon-google_apis-google-22
Please help me to resolve this problem. Thank you.
I had the same issue when trying to upgrade Android Studio from 1.1 to 1.2 on Mac OS 10.10.
I solved the problem by selecting custom installation instead of standard. Also we need to select the Android SDK Platform (Lollipop 5.1).
Choose the new UI Design >> next
Just try to cancel the "Downloading Components" from upper right
corner 'X' button.
A dialog box will appear then click OK (wait a bit for first time
launch)
I uninstall Only Android studio (keep the SDK and Emulator) and then reinstall it just android studio. took me 2 minutes and my android studio work again.
I had this same problem, but I'm a Linux user.
I resolved the problem by reattempting the installation with adminstrator privileges. [For those Linux users reading this, I ran studio.sh with sudo.]
I just click 'Retry' and it's ok! Also run on Win7 64-bit.
TRY BELOW SOLUTIONS.
SOLUTION 1:
-> Run Android Studio as Administrator (this is only required for first run or when any issues arise due to automatic updates on any run in future).
Though it shows API 23 is or any other updates are not installed (and wouldn't show any 'Retry' button), BUT still the download and installation of rest of the updates would proceed (you can see the download progress incrementing even after seeing the above errors). So, DO NOT ABORT the operation.
-> At the end of installation (after rest of successful updates are installed) it would this time display the "Retry" button to retry installation for API 23 or any other versions which had failed earlier. Then click the "Retry" button, it would work this time.
This would resolve your issue with successful installation.
-> Next time onward no need to run Android studio as Administrator, unless it does any automatic updates and shows similar issues.
SOLUTION 2:
-> Alternative approach is to install any updates (which ever failed in earlier attempt) from Android SDK Manager first and then later launch Android Studio (which would not need any check for updates and any additional installations).
To install any features or updates, run Android SDK manager as administrator (run as administrator is not mandatory for this but preferred to avoid any permissions related issues) and check the required options and proceed with the installation without any issues.
SOLUTION 3:
-> If still your issue is not resolved, then try the proxy solution as suggested by others or check your internet connectivity if it's working properly or not.
*Any of the above solutions should resolve your issues.
go to c->users->[Your user account]-> remove android 1.2 and restart the android studio
when it ask to import select first radio button which is import setting from previous config
there you go fixed
I am using Windows 7 Professional and I was having same problem #Bayu Mohammad Lufty not worked for me.
I simply delete .AndroidStudio1.2 from my C:\Users\UserName\ and restart my Android studio again.
It open Android Studio perfectly!
It configured everything again in next start :)
I'm a MacOS user.
I solved it by uninstalling Android Studio and reinstalling it again.
If you want to try this link helped me a lot.
Uninstall Android Studio MacOS (terminal)
When you are installing Android Studio, under Install type do not use standard setting, use custom setting instead, and check all the option boxes in the next step.
i have solve my same problem
i update my android studio, and i choose not to import my setting from my previous version than that problem appear.
than i realize that i have 2 AndroidStudio folder on my windows account (.AndroidStudio and .AndroidStudio1.2) and on my new .AndroidStudio1.2 folder there are no other.xml file.
than i copy other.xml file from C:\Users\my windows account name.AndroidStudio\config\options to C:\Users\my windows account name.AndroidStudio1.2\config\options
and that how i solve my problem.
I'm using UBUNTU and I got this same error. I restarted the set up using sudo and did a custom install. This solved my problem!
--More Specific--
re-installed using # sudo ./studio.sh
then I made sure to click "Custom Install"
then I made sure all packages were selected.
And I got this message Android virtual device Nexus_5_API_22_x86 was successfully created
I just run:
C:\Users[Username]\AppData\Local\Android\sdk\SDK Manager.exe
Install SDK Platform Android M Preview
And run Android Studio again.
It's working for me :D
When this error occured I first clicked retry for few times and waited for 2 minutes and clicked 'retry' then it installed without any error.(for 2 minutes I was searching to solve this problem online).
I was getting an "out of space" error, which left me scratching my head as I had plenty of disk space, until I realized that it ran out of space on /tmp, which on Arch Linux is mounted on a tmpfs with a size limit.

Android Studio freezes on startup

I searched all day but haven't find a solution yet.
Today I installed Android Studio without any problems.
I added the correct path.
JAVA_HOME to C:\Program Files\Java\jdk1.8.0_20
and
JDK_HOME to C:\Program Files\Java\jdk1.8.0_20
But, when I start the program it freezes on the loading screen. (The gray picture with the green android logo and text Android Studio)
It does create a process that I can't close, but after waiting for 20 minutes it's still on that screen.
I tried a clean install, also I tried the 32bit version without any success because it complained about the jvm that I could not fix for some reason.
I also did an update for it, but without success.
I have no idea what else I can try to fix this, but I also don't see myself going back to eclipse.
What worked for me was to disconnect my android phone which was connected to the computer(in the debugging mode).
I went from 1.5 to 2.0 and after updating it wouldn't load (hung at the startup screen). I had to delete the .android folder, the android.15 folder and the .AndroidStudioPreview2.0 folder under user. I also had to rename the SDK folder and after it started up I rename it back to what it was. Which means I had to add the path back to android studio. This was the only way I got it to work.
The same issue. "Run as administrator" helped me.
Another possible solution comes from JLund (from the comments):
I did this from the command line:
adb kill-server
adb start-server
and that unfroze Android Studio at startup for me.
Make sure there is no ANDROID_SDK_HOME, ANDROID_HOME or the like defined as you environment variable. You might need to uninstall any Android SDK previously installed manually after removing those environment variable.
My Android Studio auto loads the last worked-on project.
I cancelled the loading project before the IDE hung.
The Android Studio launcher comes up. Select the "Open an existing..." option.
Windows 10
Java 1.8.0_131
Android Studio 3.2.1
Android Studio kept getting hung up on a white screen before the IDE loaded any buttons. I renamed the project that it was trying to load, restarted Android Studio, and selected another project and it loaded correctly.
I had to revamp all manually installed 'HOME' environments and start it again-

new AVD can't click on OK button, not system image [duplicate]

This problem sounds similar to a few others, except in my case the OK button is not grey-ed out. But for those who would rather not click the links...
Trying to create or edit an AVD from within Eclipse, after entering my settings, the "OK" button seems to be "clickable", but when I click it absolutely nothing happens.
I've made sure I have the appropriate system images installed, and that the target platform matches the API being used. Clearly a CPU has been chosen, skin set, etc... all the things that would make the OK button greyed out, which it's not.
I can create/edit AVDs if I run the AVD manager from outside eclipse, so this isn't the end of the world, but I feel there's a solution to this particular problem and I want to help solve it.
I've tried running eclipse as an administrator (that's what stopped the AVD manager from crashing outside of eclipse). I've tried just waiting around, or clicking multiple times. Looking at the Task Manager, no new processes begin when I click OK, nor does eclipse's CPU or RAM usage increase at all. The "Edit Android Virtual Device" window doesn't even go away.
Any clues?
(Running Indigo with the ADT plugin, btw, not the bundled version, which failed to work in a different way. Java 1.6.0 45. Windows 8, unfortunately. Plenty of RAM etc)
THIS IS A POSSIBLE WORKAROUND FOR BUGS IN ADT 22.6.0 ONLY, THESE BUGS SUBSEQUENTLY FIXED IN FOLLOWING BUILDS
Download and install new ADT v22.6.1 from here (zip) or use SDK manager to update
Seems like some bug from Google side, this problem found after "ADT 22.6" update. Widely reported on "Android Open Source Project - Issue Tracker" and nobody properly answered it yet.
However I was partially successful to create an AVD by opening "AVD manager.exe" from "Android SDK" for creating new AVD try to open directly AVD Manager.exe in SDK folder.
May be we have to wait for any conformation from Android community
Worked for me, sort of.. .
(Windows 8.1 Pro 64 Bit, Java JDK 1.7 Update 25, Eclipse Standard Kepler Service Release 1, Android Development Toolkit 22.6.0.v201403010043-1049357)
Update 1
Further research revealed that launching AVD Manager from SDK Manager (Tools --> Manage AVDs...) also works without any problems.
Update 2
More bad news is AVD creation not working from command line tool too.
Update 3
Assuming some parameter passed during launching AVD manager from Eclipse causes these problems
Update 4
Updated Java to JDK 1.7 Update 51 and Eclipse Standard SDK to Kepler Service Release 2 their latest and no resolution to the problems. Also tested under Debian and same results obtained.
Update 5
At https://code.google.com/p/android/issues/detail?id=66661 android project members conforms the problems and promises to fix by upcoming versions of ADT (22.6.1 - 22.6.3). At the mean time I would suggest to roll-back ADT to a lower version version 22.3.0
To uninstall current ADT go to
Help --> About Eclipse --> Installation Details --> Android Development Tools --> Uninstall
I may suggest uninstalling whole packages from Android (DDMS, Hierarchy Viewer, NDT, Traceview, OpenGL ES..etc..) to avoid any possible compatibility issues and install a fresh new ADT from above link through archive installation method.
Hope this will solve this problem temporarily. And wait for new release of ADT here.
Update 6
New ADT, version 22.6.1 is out now which will solve these problems
To elaborate on the statement "I can create/edit AVDs if I run the AVD manager from outside eclipse" in the OP:
Run the following on the command line
<android-sdk-location>/tools/android avd (on Linux in this case)
This launches the same AVD window you see when you click the AVD Manager icon in the eclipse toolbar. But this instance of the AVD manager does not have the bug, and you can create and run emulators as you did before the bug was introduced.
1 minute solution
I used a quick workaround where I cloned a device that already existed. The Clone button worked and I was able to successfully edit the clone.
Steps:
Select a Device by Google
Click the "Clone..." button
A window will pop up, click "Clone device"
Select the newly cloned Device, it should say "... by User"
Click the "Edit" button on the side
There you have it, you now have your own custom virtual device
Update and Solution: AsYashwanth Krishnan said, The bug in question is now fixed in later versions. I tried ADT 222.6.1 and ADT 22.6.2 , and they did not suffer from the bug of not not being able to create or edit Android Virtual Devices. The direct solution is to update you ADT to latest version, The workaround written below is left only for historical purposes.
Historical Workaround As #Yashwanth Krishnan said, this is a bug in ADT plugin 22.6; so best workaround is to rollback. for those asking how to rollback, here is a step-by-step guide:
First: Uninstall ADT plugin and all related plugins for android:
help->about
Installation details
Select android plugins and press uninstall button
Restart
Second: Download ADT 22.3.0 Archive from https://dl.google.com/android/ADT-22.3.0.zip
and install it
add repository from archive on local disk
Select android plugins
INFO:
I WAS able to create an AVD successfully after clicking OK several times and modifying some of my settings as a test.
I tried yashwanth krishnan solution and tried to open the AVD Manageer.exe directly without success. The manager will not open directly for me on Windows 8 x64. It tries to open, then shuts down immediately...
I met this issue too . The issue occurs in the latest version 22.6 which was released in March . Meanwhile I did the testing in 22.3 , the issue was not found .
So that I suggest that rollback the ADT to 22.3 and wait the new fix for 22.6
I banged my head on this for several hours until I found out that the default location was C:\username path\SDKs or something, where Android was installed on my system to D:\sdks\android_sdk_windows. So, changing the Eclipse Android directory to D:\sdks\android_sdk_windows fixed it.
I also heard that it may help things if you install the Android SDK to a path without spaces.
Hope this helps someone keep some hair.
Today I ran into the same problem after installing Maven. I messed around with different Path settings to get it to work and I ran into issues. I was also trying to install the google server for GCM. Somewhere in what I was doing I corrupted the Android Virtual Device Manager. I searched S.O. for an answer, then I decided to follow the first rule of TechSupport. I reinstalled the tool kit!
I went into the SDK manager and I uninstalled the tools (by clicking the Tool checkbox). It took several minutes to delete them all. Then I reinstalled the Tools which took about ten minutes. I rebooted Eclipse and the AVD and worked just like it did yesterday!
This time it only took a total of twenty minutes to fix.
Per the release notes, this problem has been resolved in revision 22.6.1, which is now available for download.
Updated your Android SDK Tools to 22.6.1 in Eclipse by selecting Window > Android SDK Manager and follow the prompts to install the update.
After that update finishes, select Help > Check for Updates and follow the prompts to update the appropriate Eclipse components.
After completing these updates, I tested the AVD functionality and it appears to be working properly.
i just copied the avds from a different system as descriped here:
Android - How to copy the emulator to a friend for testing
I faced the similar issue. I am using 23.0.2 version of android SDK.
"OK" button was disabled, but then I went to the path where android SDK was installed. In my case:
C:\Program Files\Android\android-sdk\
and executed AVD-Manager.exe by right clicking and selecting Run as an Administrator, and it worked like a charm.
Sometimes the AVD cannot be created because of this following error while starting:
x86 emulation currently requires hardware acceleration!
I was also facing this same issue. If u are facing the same, then it can be resolved by opening SDK Manager -> Under Extra -> Installed "Intel x86 Emulator Accelerator (HAXM Installer). Then when creating the AVD, select the proper CPU. This should work. :-)
For those posting that we need to set the sdcard size: I tried that and many other settings, and none of that helps. I get the NoClassDefFound Exception mentioned by mogilka, in the Error view. No configuration settings are going to fix that. It seems a bad update was pushed
Give some value for your sd card. May be something like 100 or 200

Categories

Resources