Gautam
Gautam

Reputation: 7958

"Android SDK folder inside the application folder" When upgrading android studio

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.

Upvotes: 12

Views: 25653

Answers (8)

Andrew Craton
Andrew Craton

Reputation: 1

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.

Upvotes: 0

Mike
Mike

Reputation: 5572

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.

Upvotes: 0

Roman Balmus
Roman Balmus

Reputation: 41

(Windows 8) Steps I did to fix this:

  1. Open Android Studio->Help->Check for update...

  2. Update and restart

  3. 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"

  4. After step "3" Android Studio will launch and will ask to set the sdk path.

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

  6. Done. This solved my "Android SDK folder inside the application folder" while try to update from 0.8.6 to 0.8.14

Upvotes: 4

georger
georger

Reputation: 1668

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.

Upvotes: 1

MobDev
MobDev

Reputation: 464

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.

Upvotes: 0

Assaf Gamliel
Assaf Gamliel

Reputation: 12015

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: enter image description here

Upvotes: 32

Mohammad Ersan
Mohammad Ersan

Reputation: 12444

I'll assume you are using Mac OS not Windows, if true, you will need to do the following:

  1. Go to Android Studio in Applications directory
  2. Right click over its icon and select Show Package Content
  3. Cut (Move) sdk directory to another place (ex. /home/sdk)
  4. Restart Android Studio and select the sdk path where you moved it (ex. /home/sdk/)
  5. Update

Upvotes: 11

Gautam
Gautam

Reputation: 7958

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

Upvotes: 1

Related Questions