First off I want to say that I'm not trying to change where software should "look," for the SDK. I already did that and it works fine.
I am trying to update the SDK tools through Android Studio and even though I already have the SDK and other tools installed on a larger secondary "E:/" drive that's 4tb, Android Studio insists on downloading something more than 60gb of files onto my (already almost full) 120gb SSD boot drive where Android Studio is installed.
The folders that it's downloading are:
C:\users\<user name>\AppData\Local\Temp\PackageOperation##
It only said it was going to take 14GB before I started downloading which makes it all the more frustrating. It's still downloading as I post this, and it's only about 1/4 of the way done but I have to go to work. I'm worried it's going to run out of space and not be able to finish. Is there any way to tell Android Studio to download these to my other HDD?
Update: It went to about 70GB and left me with only 1GB of free space before it started deleting the files and freeing up space. It ended up finishing, but I don't know if this was a coincidence or not. It's still too close for comfort so if anyone could help that would be fantastic
I want to write apps for android but I'm having an unresolved problem by installing IntelliJ IDEA.
The installation runs good, but always when I try to select the Android SDK, I get the famous error: The selected directory is not a valid home for Android SDK
I tried many ways to resolve it.
I read other tasks on SO but nothing helped me very well.
I adapted the system environment variables
I tried different paths (like C://User/AppData/Local/Android/SDK and C://Program Files/Android/SDK)
I checked the path for mistakes (like blanks)
I uninstalled the program (for round about three times)
I restarted my pc
I restarted the program
checked if all is correct (and it was. Every time.)
I run as administrator
I checked if the files are writeable
I tried Android Studio of course too, but the error occurs nonetheless.
Here are my PC Specs:
- Have an Asus ZenBook
- i7-7500U CPU
- 8GB RAM
- Win10 Home
I really hope you can help me. Thanks a lot.
In Android Studio go to File->Settings->Syestem Settings->Android SDK than click on Android SDK Location Edit button It'll auto-detect SDK location in your system if SDK not found than download window will open and from there download SDK. For your ease see the below image.
I installed Android Studio (1.5.1 -- see image for build details).
While installing I chose the custom option so I could install a specific path.
I knew that my %SystemDrive% was pointed at a network location and I wanted to install to my local disk.
So, this means that by default, the application would've installed to :
\networkpath\users\myUserName\Android\SDK
However, since I chose the custom installation I chose a local path:
c:\users\myUsername\Android\SDK
Project Creation and Build Work Fine
Everything seemed to install fine and I was able to create a new project and build it with no problems.
However, when I attempted to run the built and then basically failed silently.
The emulator never appeared and no error occurred.
Android Monitor just shows a message stating that No Connected Device detected.
AVD Manager
Luckily I knew a bit about checking to see what happened with the emulator and I opened up AVD Manager.
The listed device displayed an error.
I right-clicked the device and chose "View Details".
That's when the AVD manager showed that it is attempting to read from the network path, even though I changed this in the custom installation.
\networkPath\Users\myUserName\Windows.android\avd\Nexus4.avd
and
\networkPath\Users\myUserName\Windows.android\avd\Nexus4.ini
Registry Edit
I closed Android Studio. Then I opened regedit and edited the values at:
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
which originally looked like the following:
And changed them so they all point directly to the c:\ drive (instead of %systemdrive%)
Environment Variable : ANDROID_SDK_HOME
I found that others have mentioned the ANDROID_SDK_HOME environment variable and I noticed that my machine doesn't have that value defined at all so I added it and set it up like the following:
c:\users\myUsername\Android\SDK
I then started Android Studio again and started the AVD Manager.
This time there were no devices show, but instead AVD Manager prompted me to create one with the following window:
Now, I'm attempting to download one of the devices with Google APIs, but each time I do, they download and install successfully, but then disappear from the list. Notice, in the next image there are not API Level 15 or 16 with Google APIs for arm architecture.
Notice additionally that there is one listed for API Level 17 with arm.
I will now attempt to install that one.
You can see that it downloaded successfully and installed fine.
Now, I click the [Finish] button.
The item no longer appears in my list.
The API Level 15 item is chosen automatically. I'm assuming because that one was downloaded originally when I installed Android Studio.
Finally, if you uncheck the [ ] show downloadable system images checkbox -- which is terribly confusing -- and I'm assuming shows you the ones you've already downloaded, then you'll see that it only shows the one API Level 15 virtual device.
This is all quite terrible. Has anyone seen this problem?
Has anyone else been able to fix it?
I'm assuming that I'll just have to go and do a complete re-install of Android Studio.
You should look in the idea.properties file in your project (Android Studio path to different directories). It sounds like this is set to override the system's settings.
EDIT 2 With Final Solution
Thanks to an alert and astute SO post-er (code-apprentice) I was able to get to a solution.
Here's what I had to do.
create idea.properties file and place it at the \networkLocation\myUserName\.Android 1.5\
place the two lines in it which point to my local disk
idea.config.path=C:/Users/myUserName/.AndroidStudio1.5/config/
idea.system.path=C:/Users/myUserName/.AndroidStudio1.5/system/
Then I started Android Studio again and I attempt to install a system image which included the Google APIs.
It worked and it was added to the list:
However, it still did not show the other API LEVELS which I had installed before (15, 16, etc).
Deleted Them From Disk
I noticed that they had been located in a local folder at :
%userprofile%\Android\SDK\add-ons
for whatever reason.
I deleted all of the folders under that path and the original APIs with Google choices appeared in my list again. See highlighted item in image.
SOLUTION
Now when I install them they show up in the list and I can create new AVDs based upon them. Everything works.
EDIT
I used a tool I wrote to watch where Android Studio wrote to disk and I found a path that reveals the problem:
Even though I've made extensive changes to insure the installation would install completely on my local disk, Android Studio saves some (a lot) of data out to this path.
I did a Google on : .AndroidStudio 1.5\config\
That led me to the following documentation:
http://tools.android.com/tech-docs/configuration
There, you will see that the installation should be using %userprofile% to determine where it writes this data. My %userprofile% points to my local disk (c:\users\myUserName) but Android Studio still insists on writing data out to the network.
Here's the important information:
Windows:
%USERPROFILE%\.{FOLDER_NAME}\studio.exe.vmoptions
and/or
%USERPROFILE%\.{FOLDER_NAME}\studio64.exe.vmoptions
%USERPROFILE%\.{FOLDER_NAME}\idea.properties
I deleted the remote .Android Studio 1.5 directory and copied it to my %userprofile% (local) directory. Then I restarted Android Studio and it thinks that it needs to generate all that again because it wants to place it at the remote directory again.
Core issue:
Obviously, it is not using %userprofile%
It gets worse.
I uninstalled the application and all of the settings (supposedly).
Then I installed the entire thing again and it looked as if it were choosing the correct installation path by default:
But, when I started Studio back up then it opened up the project I had created with the first install.
Plus, I still cannot see the API image that I supposedly installed before. Only that one image. Nothing else.
This is really not a great installation system. I'm working on a book which helps beginning Android Devs but if they fall into this problem loop there is no way to get them out of it with a good running emulator.
Very unfortunate.
Download the respective SDK and API levels and Image Systems on Android SDK Manager.
And then they'll show up normally on AVD.
I am getting this error randomly and not sure as to why my disk space is getting low for Android Studio..
Low disk space on a Android Studio system directory partition
Update
This Application is installed on a mac running 10.10.1 w/ 251GB internal storage and an OS restore Drive taking 10GB.
I think the problem is, once the application was installed it was placed on the smaller partition.
I will attempt to remove this application and all files associated to it, and reinstall. Hopefully this will solve the issue.
You can install studio and SDK separately into different partitions: http://developer.android.com/sdk/index.html#Other
Or you can move your existing SDK folder anywhere and then just point studio to it in preferences.
Also consider that AVD files are actually stored in your system user folder (user/.android/avd on Windows, not sure where exactly on mac), not in SDK folder.
I had the same problem, I installed android studio a 128gb partition and togther with JAVA jdk and all sdk related file it consume most of its disk space. I re-install it on a larger partition and it solve my problem.
I was getting this error and restarting Android Studio and adding more memory did not help. At this point I noticed it was happening across all my emulators in android studio. It turns out that some of the files in the emulators could not be read because they have became corrupt. The simplest solution is usually the best answer so restarting my computer fixed it. Hope this saves someone time!
Android Studio with SDK Tools,JDK and AVD takes almost 30gb but I believe that it needs a little bit more to work properly.Everything bigger than 40gb it's Ok.It depends on the number of SDK's that you download.If you have 40gb of free disk space you will never have this message.Sometimes crashes or pop messages if you use it a lot of days without reboot your computer make a reboot and everything will be fine.
I just compressed the drive and there was 25GB of space available now. The problem vanished. Then when i shutted down my PC and restarted it the next day I got an error BOOTMGR compressed. SO i followed this tutorial https://www.youtube.com/watch?v=3tnyhz-CRQU and fixed it and now I still have 25GB space available. It worked for me
Please open below mention path and delete you all avd's here.
C:\Users{Username}.android\avd
Sometimes, deleting emulator in android studio is not enough to reduce all the spaces grab by these emulator's. So deleting these emulator's from above mention path.
You can click on your SDK manager then navigate to Appearance settings > systems settings > Android SDK. From here just click on optimize disk space on the top right corner of your window. I was able to clear about 15gb then it worked smoothly.
I had a same problem and I solved by deleting some unwanted files from my disk.
Reason - The disk space is low which u have android SDK and android studio file.
solution - Delect some files from your disk which has your android sdk and studio.
If you have facing the issue in low disk space in android studio,just delete the unwanted emulator in your AVD manager.I wasted the whole to try other things.it help full to any one.it working for me.
It worked only after restarting my MacBook 🤷♂️
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