When upgrading android studio from 0.8.9 to 0.8.14 I get the error
Android SDK folder inside the application folder
even though my Android SDK folder is not inside Android Studio Folder.
As you can see in the release notes:
To proceed, you should open up a file explorer or finder window, go to the Android Studio installation (e.g. /Applications/Android Studio.app) and move the sdk/ folder over to a different location, such as your home directory. Once done, press Retry to finish installing the patch. The reason this is necessary is two-fold: First, we have made a lot of improvements to make the patch updater more accurate, and in order for installation signatures to match, you cannot have non-application folders inside the application directory. Second, placing the SDK folder inside the application directory was probably not a good idea to begin with: this folder should typically be writable and in a directory with a lot of extra diskspace, such that users can easily download and install additional libraries, system images and so on. We are doing some work on the installer side to make this easier to set up.
In the meantime, please find a different place to put the SDK (for example ~/android-sdk), and then point your SDK to this directory location instead. You can do this either by opening up the Project Structure Dialog and selecting the SDK Location tab, or if you try to load a project which is using the old location, you'll be prompted for the new location:
I'll assume you are using Mac OS not Windows, if true, you will need to do the following:
Go to Android Studio in Applications directory
Right click over its icon and select Show Package Content
Cut (Move) sdk directory to another place (ex. /home/sdk)
Restart Android Studio and select the sdk path where you moved it (ex. /home/sdk/)
Update
(Windows 8)
Steps I did to fix this:
Open Android Studio->Help->Check for update...
Update and restart
While downloading find folder "sdk" inside android studio installation folder, rigth click and "cut", paste the folder somewhere outside the android installation folder. Wait till download finish, a java window will appear sayng there was some corrup files, in my case was the file "uninstall.exe" select this file from list and hit "proceed"
After step "3" Android Studio will launch and will ask to set the sdk path.
Get the sdk folder that was pasted outside from android installation folder and bring him back. (read step 3), in the selection window from step 4, select the sdk path (re-copied sdk folder that was bringed back).
Done. This solved my "Android SDK folder inside the application folder" while try to update from 0.8.6 to 0.8.14
This is described in Known Issues. The best solution I found for this problem was to download android studio again from the downloads page and reinstalling it, instead of trying to run an upgrade. This solved the problem for me.
Edit based on #stknet's comment
Upgrading from 0.8.9 to 0.8.12+ requires a reinstall see here
You need to go to the Android installation folder from your file explorer, get the sdk folder and move it somewhere else (I put in a folder called SDKs) and then go and open Android Studio again. It will ask to point it to the sdk folder so just give it the path to your sdk folder and let Gradle synchronize it. After that go to Android Studio update and check for updates. Now you can update without errors.
This problem is detailed here.
For example I use it on Xubunutu and I just went to /usr/share/android-studio/data/ and cut the sdk folder and then moved it into /home/user_name/sdks. After that I fired Android Studio, pointed to the new sdk folder and updated.
No re-install required.
Hey even i faced this issue.
Just remove sdk folder present in android-studio folder and place it outside folder(or somewhere) and update. Once you update it will ask you for SDK location if no then manually update the SDK location in local.properties.
Hope this will help you.
Just had this issue while updated Android Studio from 2.2.2 to 2.2.3 in Windows 10. My SDK directory has not been in Android Studio's application directory since 2014. However, somehow an empty 'sdk' directory had appeared in
C:\Users\[username]\AppData\Local\Android\android-studio
Renaming the directory fixed the issue. The installation then deleted deleted my new 'sdk-blah' directory.
AFTER installing the SDK elsewhere and referencing your environment variable to that new location, simply delete the
D:\Android Studio\sdk folder
and Android Studio won't rely on it.
Related
I'm having problems uninstalling Android Studio in Win10, I can't find the uninstall.exe file. I installed it, but I'm not going to use it, after all, so I went to Control Panel>Programs and Features, but when I tried from there it said it couldn't find the uninstall.exe and removed it from the list, I have the Android Studio folders in Program Files and all, but that's it.
I already removed the SDK from the user folder. All that's left is in Program Files. I tried reinstalling but only creates another installation folder under 'Android Studio1'.
Thanks in advance!
A comment by Flot2011 answered this question.
Flot2011's comment:
Go to C:\Users%username%, and delete .android,
.AndroidStudio(#version-number), .gradle and AndroidStudioProjects
directories if they exist. After that go to
C:\Users%username%\AppData\Roaming and delete the JetBrains
directory.
Just follow Flot2011's directions and restart your PC, and Android Studio is no more on your computer.
This is what I did to resolve this exact issue:
Launch Android Studio.
Upgrade Android Studio to the latest version when prompted.
Delete C:\Program Files\Android\
Download the latest Android Studio installer.
Install the latest Android Studio. This will replace the files removed in step 3, and install a functioning uninstaller.
Run the uninstaller from the Settings app. Make sure to check the user preferences box so that it deletes the files in %userprofile%.
I prefer this approach to manually removing directories because the installers and updaters should get all of them and also address any registry changes that need to be made.
so I've downloaded the Android Studio IDE from the official website, installed, and run it. When I try to create a new project this is what I get:
Obviously I click on (open SDK manager):
I then click on (Edit):
At first, the directory /Android/SDK was totally missing, so I added it manually by creating the two folders Android and SDK in the directory C:\Users\Sam\AppData\Local\ . Which led to the line "target folder is neither empty nor does it point to an existing SDK installation". The SDK manager was never Installed, I couldn't find it in the directory mentioned. Therefore, I downloaded the SDK tools and put it in the directory specified, but that didn't work. An SO thread has suggested that I don't have enough storage space for the SDK, but I have almost 31GB of empty space on my C:\ drive, another one has suggested that I have a proxy/ http problem but I don't think that this is the problem here since I've downloaded the IDE with no problems.
After I hit next this is what I get:
Now how could the SDK could be is up to date while there isn't any SDK to be seen?
I'd appreciate some help, have a nice day
this error may arise when your sdk folder not a 'platforms' folder and you must make an empty folder and rename it to 'platforms'. platforms folder must be in the sdk folder.
I downloaded SDK installers alone and solved the problem. One site to get the installers is: SDK Installer
I have already seen this question.
But that's for Mac OS. I am using windows. Every time I create a new project or try to build/rebuild the project it freezes!! I have installed the latest version(9/10/2016). But things are getting worse. I want to completely remove it and install it as if I would be installing it for the first time. Any help be Appreciated.
To Completely Remove Android Studio from Windows:
Step 1: Run the Android Studio uninstaller
The first step is to run the uninstaller. Open the Control Panel and under Programs, select Uninstall a Program. After that, click on "Android Studio" and press Uninstall. If you have multiple versions, uninstall them as well.
Step 2: Remove the Android Studio files
To delete any remains of Android Studio setting files, in File Explorer, go to your user folder (%USERPROFILE%), and delete .android, .AndroidStudio and any analogous directories with versions on the end, i.e. .AndroidStudio1.2, as well as .gradle and .m2 if they exist.
Then go to %APPDATA% and delete the JetBrains directory.
Also delete the any AndroidStudio* directories that are in %LOCALAPPDATA%\Google and %APPDATA%\Google.
Finally, go to C:\Program Files and delete the Android directory.
Step 3: Remove SDK
To delete any remains of the SDK, go to %LOCALAPPDATA% and delete the Android directory.
Step 4: Delete Android Studio projects
Android Studio creates projects in a folder %USERPROFILE%\AndroidStudioProjects, which you may want to delete.
In 2021, If you are looking for uninstall.exe, the latest Android studio version doesn't come with an uninstaller. Download an older version of the Android studio from the Android studio download archive official LINK; you can download Android Studio 4.1.1.
Download the zip files, extract the uninstall.exe from it, and put it in your Android Studio folder; there is no need to install that older version.
UPDATE - 04/14/2022
Looks like the new version comes with unistall.exe now.
Tried on - Android Studio Bumblebee | 2021.1.1 Patch 3 for Windows 64-bit (April 2022)
I was having a problem installing the latest v4.1.2 as it was having an issue where after I start it, it shows my old blank project, so the things I did were:
Caution: Please move your SDK and projects to a separate location before following steps if you haven't. So it might save your time downloading SDKs and stuff.
1- Uninstall old Android Studio completely (from Control Panel -> Programs).
2- Delete this Android Studio folder located at C:\Users\\<user_name>\AppData\Local\Google
3- Delete this Android Studio folder located at C:\Users\\<user_name>\AppData\Roaming\Google
4- Delete these folders (.android ,.AndroidStudio*, .gradle) located at C:\Users\\<user_name>
After doing all this, I managed to have fresh updated Android Studio v4.1.2
First go to android studio folder on location that you installed it ( It’s usually in this path by default ; C:\Program Files\Android\Android Studio, unless you change it when you install Android Studio). Find and run uninstall.exe file.
Wait until uninstallation complete successfully, just few minutes, and after click the close.
To delete any remains of Android Studio setting files, in File Explorer, go to C:\Users\%username%, and delete .android, .AndroidStudio(#version-number) and also .gradle, AndroidStudioProjects if they exist. If you want remain your projects, you’d like to keep AndroidStudioProjects folder.
Then, go to C:\Users\%username%\AppData\Roaming and delete the JetBrains directory.
Note that AppData folder is hidden by default, to make visible it go to view tab and check hidden items in windows8 and10 ( in windows7 Select Folder Options, then select the View tab. Under Advanced settings, select Show hidden files, folders, and drives, and then select OK.
Done, you can remove Android Studio successfully, if you plan to delete SDK tools too, it is enough to remove SDK folder completely.
Firstly, uninstall Android Studio from the control panel using program and features.
Later you also need to enable displaying of hidden files and folders and delete the following:
C:/Users/${yourUserName}/AppData/Local/Android
If you do not have an uninstaller, follow the below steps:
Download and install an old version of Android Studio (eg: android-studio-ide-191.5977832-windows.exe aka Android Studio 3.5.2) from the download archives.
Copy (do not cut) and Paste the uninstall.exe from the installed Android Studio folder in your original Android Studio folder. Now, run the uninstall.exe which you just pasted, this will start the uninstall process for your original Android Studio.
After the original Android Studio is uninstalled, proceed to run the uninstaller in the old version of Android Studio that you downloaded.
After the old Android Studio is uninstalled, follow this to completely remove any leftover Android Studio related files, folders etc.
Now your system has no Android Studio.
In my case - Windows 10 Home, for removing previous settings, I had to delete AndroidStudioX from C:\Users\<Your User>\AppData\Roaming\Google as well.
Complementary to the 1st and 2nd upvoted answers, also take a look if anything like Android Studio folder remains at C:\ProgramData\Microsoft\Windows\Start Menu\Programs\ to avoid wrong references in future installations.
.android
check this folder in
C:\Users\user
its have an issue and fix it then restart android studio.
https://stackoverflow.com/a/39953746/3116336 is complete answer but you need to delete also %APPDATA%/Local/Google/Android
folder.
latest Android Studio in 2022, March
has an uninstall.exe in the root directory.
For me uninstalling from "Windows Remove Programms View" didn't work, failing with error popup.
But going to the installation directory and just executing uninstall.exe just works perfectly.
I tried multiple times to get a clean install without success.
I found if I still had the AndroidStudioProjects folder then Android would naturally go to my last project I was working on and start to build that project.
I made a copy of that folder and saved my code to the desktop. Then I deleted the AndroidStudioProjects folder and I had the option of a completely fresh install.
This was done after following this to the letter: https://stackoverflow.com/a/39953746/8860848
I have installed Android Studio for the millionth time but when i go to C:\Program Files\Android\Android Studio , i can't find any folder named "SDK" , can't find it any where on the computer either.
Also, the SDK manager doesn't open, which i guess is a problem linked to the first one.
If you have downloaded the AS + SDK bundle:
Assuming the defaults were left unchanged, you will find the SDK in
C:\Users\%USERNAME%\AppData\Local\Android
If it is missing at this location, one of the following reasons apply: you have chosen a custom location, you missed to install the SDK at all, or (unlikely) they have changed the default install location.
Note #1: the AppData directory is hidden by default. If you have a standard Windows configuration, the C:\ path above should work "as is" (hit Win + R -> paste the path -> Enter).
Note #2: you will never find the SDK in the Android Studio directory unless you have explicitly put it in there. The reason is that those directories might be deleted after installing a newer version of Android Studio and you would have to re-install the SDK as well.
If you have retrieved the standalone SDK by some other means:
The SDK location may vary (from my experience), however (assuming the default configuration) you will most likely find it in C:\Program Files\Android or C:\Users\%USERNAME%
Tools > Android > SDK Manager > there you'll see the path to SDK
If you don't have it at C:\Users\%USERNAME%\AppData\Local\Android (this is where most people have it) than it is possible you don't have it installed. Go to Tools > Android > SDK Manager and then click on "Android SDK." On the top of the SDK Manager it will list the SDK Location. Click edit. If you don't have Android SDK installed, it will give you the option to install it in certain location. Install it, and Android Studio should work!
SDK folder by defalut is in C:\Users\<user-name>\AppData\Local\Android. And the AppData folder is hidden in windows. Enable show hidden files in folder option, and give a look inside that.
Make sure all the folders are visible.
click start>control panel>Appearance and Personalization>Show hidden files and folders then click "Show hidden files, folders and drives"
The file should be in C:\Users\Username\AppData\Local\Android as mentioned above. otherwise you can check by opening Android SDK Manager - top left under SDK path.
If SDK folder is present in system, one can find in C:\Users\%USERNAME%\AppData\Local\Android
If Android/SDK folder is not found
Once done with downloading and installing Android Studio, you need to launch studio.
On launching Android studio for the first time, we get option to download further more components, in that we have SDK.
On downloading components one can find SDK under Appdata (C:\Users\%USERNAME%\AppData\Local\Android)
I had to open Android studio and go through the wizard. Android studio will install the SDK for you.
If your are using android studio go to file >> project structure on the left pane press on SDK location . you will find the path where your sdk is located
When you install the android studio just by downloading from https://developer.android.com/studio/install.html sometimes sdk folder will not get appear in C:\Users\home\AppData\Local\Android Location..
But to set the android studio we need to set the path for android on this location.
So simply
1) start the android setup.
2) follow the instruction and android studio will automatically download the sdk folder by itself. (it will show the window like "Downloading Components").
After completing that installation check the above path again.
sdk folder will get appear now.
I faced the same issue. And I am able to resolve it by uninstalling the previous version I had, and removing the Android studio projects and reinstalling it.
And then go to Settings-> Android Studio -> Click on edit, to specify studio location, it will recognize the requask you if you would like to download sdk,
So I was trying to root one of my old phones and process required Android SDK. When I searched Android SDK, all i could do was download and install Android Studio. Everything went fine and smooth, till I tried to look for SDK in installation. I could not find it under Android Studio installation. But after a little search on Google and Android Studio configuration on my computer, I was able to find it at
C:\Users\username\Android\sdk
I hope that helps.
C:\Users\*********\AppData\Local\Android\Sdk
Check whether the USERNAME is correct, for me a new USERNAME got created with my proxy extension.
I found it in /Users//Library/Android/sdk
For me it was :
C:\Users\{your-user-name}\AppData\Local\Android\Sdk\tools\bin
Hope it helps!
After installation if you get a message about Proxy, it means that you're probably behind a firewall. You can create a new Outgoing firewall rule to include it. Add this to Allow:
C:\Program Files\Android\Android Studio\bin\studio64.exe
It will then download required SDK components
Once that's done, SDK will be in:
C:\Users\your_user_name\AppData\Local\Android\Sdk
For anyone who really can't find the SDK, you can manually download it from android studio.
File => Settings => Appearance & Behavior => System Settings => Android SDK
If you do not have a SDK (or did not select the right folder), you will be asked to select the SDK version and the folder where the SDK will be installed.
This is how I fixed by SDK not found problem.
System: Ubuntu 16.04 LTS, yet you can try these steps in accordance to your respective systems.
If there is an SDK file present, it should be most likely found at /home/USERNAME/Android/sdk
USERNAME is to be replaced by your username
If there is none, check the specified sdk path for the project in android studio.
File > Project Structure > sdk path
The sdk directory should be present in the specified path. In case, it is not there, open the file:
PROJECT_DIRECTORY/android/local.properties
PROJECT_DIRECTORY needs to be replaced by your project name.
If the file is not there, create it.
Then add the following line depending on where you find the sdk directory.
If sdk is there at /home/USERNAME/Android/:
add the line: sdk.dir = /home/tanya/Android/sdk
If sdk is not there at /home/USERNAME/Android/:
add the line: sdk.dir = /home/tanya/Android/
If the path specified for sdk directory in 'Project Structure' is entirely different and the sdk directory is present at the specified location,
add the line: sdk.dir = SPECIFIED_SDK_PATH
Add the specified sdk path in place of SPECIFIED_SDK_PATH
I am an android programmer, i use eclipse. i want to try android studio, thus, i download it and tried to open it.
it says that i have to put the sdk path.
what i have tried
i tried to set it to my the android-sdk which eclipse is working on it. that sdk is up to date and have all the supports, apis ...etc.
also
i found a question here in the stackoverflow about my problem: Android-studio Selected directory is not valid home for Android SDK
The solution was to open the android studio and then press f4 and then go to platform setting and the press the plus green sign then select the sdk then select the path to my android-sdk, i did all of that but android studio keeps telling me that the
The selected directory is not a valid home for Android SDK
any help would be appreciated
I found the solution myself, the answer was to run android studio as an administrator :P
Had the same problem.
I was trying to select
C:\Program Files (x86)\Android\android-sdk\platforms\android-XX
But what I actually had to do was to select android-sdk folder.
C:\Program Files (x86)\Android\android-sdk
Then I was able to choose the API I wanted from a list of APIs that would show up.
I had this problem, select SDK folder (NOT SDK->sources or SDK-platforms)
I found another solution make sure that you have write access to that directory. That fixed the issue for me.
Another way this may need to be fixed is by making sure there is at least one SDK
platform installed. Run in the commandline from the android-sdk folder:
.\tools\bin\sdkmanager.bat platforms;android-XX
where XX is the any Android SDK version.
It might occurs, if Android Studio tries to open the previous project with ".idea" directory. Well, solution is to remove that folder and .iml file too.
Works for me.
What helped for me was moving the android sdk to a folder without any special characters (e.g. no "Program Files (x86)").
In intellij idea File -> Invalidate Caches/Restart
I solved it from here
http://www.blog.teamguru.in/2018/04/06/selected-directory-is-not-a-valid-home-for-sdk/
1- Just close current error window and let run the android studio
2- open sdk manager as shown in below
3- Clik on Edit sdk location as below
4- Simply press next button if there is correct location for sdk you want to install there
5- let it be downloaded
6- install platform and SDK tools and
7- Enjoy
For me the problem was I copied the previous Android Studio settings from my old computer, and then I imported them. But I didn't copy the old SDK! Probably the SDK path is also configured somewhere in the old settings. Instead of download them, Android Studio kept complaining about my SDK location. Finally, I also just copied the old SDK directory and then the problem was solved.
Problem Statement selected directory is not a valid home for sdk
I have resolved from here
http://www.blog.teamguru.in/2018/04/06/selected-directory-is-not-a-valid-home-for-sdk/
1- Just close current error window and let run the android studio 2- open sdk manager as shown in below
3- Clik on Edit sdk location as below
4- Simply press next button if there is correct location for sdk you want to install there
5- let it be downloaded
6- install platform and SDK tools and
7- Enjoy