64

Possible duplicate, I just download a Android Studio Zip file like Eclipse, as I opened getting this error.

enter image description here

But problem is how to update it?

Rajendra arora
  • 2,186
  • 1
  • 16
  • 23
user3309991
  • 645
  • 1
  • 5
  • 6

11 Answers11

75

same problem happened to me, From this

I have faced the same issue, to solve it:

1- delete (or move) the projects folder (AndroidStudioProjects).

2- Run the Android-Studio (a WELCOME screen will started).

3- From Welcome Screen choose, "Configure -> Project Defaults -> Project Structure)

4- Under Platform Settings choose SDKs.

5- Select Android SDK -> right_click delete.

6- Right_click -> New Sdk -> Android SDK -> choose your SDK dir -> then OK.

7- Choose the Build target -> apply -> OK. enjoy

Community
  • 1
  • 1
Rajendra arora
  • 2,186
  • 1
  • 16
  • 23
  • what is the android sdk directory? – Hosein Aqajani Jul 05 '16 at 20:40
  • In OS android sdk is probably at $/Users/**YourUserName**/Library/Android/sdk @H.Aqjn – aydinugur Jun 20 '17 at 22:37
  • The directory was StudioProjects in 2.2. – Dereckson Nov 02 '17 at 11:28
  • This works with Android Studio 3.0.1 as well. (The error message was bit different there) – BlackBeard Jan 06 '18 at 03:44
  • Android SDK issue still exist with 3.1 windows version and your recommendation not applicable at all – RJN Mar 31 '18 at 13:02
  • This happened to me after attempting to reinstall Android Studio. Looks like the AndroidStudioProjects folder wasn't removed with my old Uninstall. – WiseGuy Jul 25 '18 at 15:53
  • OMFG Finally solved this! I accidentally deleted my Android/Sdk, and NONE of the advice anywhere else was helping. Can't download android sdk anymore, or at least Android Studio won't recognize it. Repo version didn't help. Nothing in AS zip. Reinstall didn't help. Tried everything but this. Thank you! – musicin3d Nov 11 '18 at 10:23
  • This answer did not work. The ones below to close the project to trigger the sdk installer did work. As would the answers to this one: https://stackoverflow.com/questions/39685090/error-please-provide-a-path-to-the-android-sdk – poleguy Dec 20 '21 at 18:09
57

I had same issue in Android Studio 3. (the project was open) so I closed the current project and the IDE automatically prompted to download the latest components. once its done everything was working correctly.

Desolator
  • 22,411
  • 20
  • 73
  • 96
  • To be more clear: You must not close android studio. You must close just the project from within android studio. This was not at all clear to me. Google should recognize this behavior as a bug and fix it. – poleguy Dec 20 '21 at 18:06
  • funny it worked.. wasted a lot of time but sometimes the good old trick of restart works – Awais Saifi Oct 13 '22 at 11:46
48

Here's a better approach where you don't have to delete/move anything for Android Studio 3.+.

  1. Open Android Studio and click cancel/ignore for error prompts on missing SDK for each project.
  2. Close all your open projects. You can do this by File > Close Project.
  3. After you do step 1 for all projects, the Welcome screen appears.
  4. The welcome screen will detect you are missing the SDK and give you options to fix the problem, i.e., install the SDKs for you.
codingjeremy
  • 5,215
  • 1
  • 36
  • 39
  • 4
    For those coming here, this is by far the best and easiest answer. It just pops up! – CGuess Apr 04 '20 at 22:37
  • duplicated answer from https://stackoverflow.com/a/46351772/326904 – Desolator Aug 16 '20 at 18:28
  • 1
    This is a better answer because it explicitly says to use "File > Close Project" rather than just closing android studio, which you could do naively thinking that this would be a fine way to close the project. – poleguy Dec 20 '21 at 18:08
  • 1
    this is the best answer in this thread!! – zagros Jan 16 '23 at 01:34
  • 1
    Thank you so much!! I have wasted two hours on this crap today before I found this! – Kimble Jun 12 '23 at 08:53
13

Click on Tools > SDK Manager or click SDK Manager after If you are unable to see the location of your Android SDK Location, click on edit and create a folder where you want to keep it and then click Next and Finish enter image description here

Bhaskara Arani
  • 1,556
  • 1
  • 26
  • 44
10

Source: https://stackoverflow.com/a/46351772/13093413

(Top right corner) File > Close Project > After you close the project you will get a screen which says that you don't have an sdk and will ask you if you want to install it.

Trake Vital
  • 1,019
  • 10
  • 18
7

I was able to trigger an SDK download like this:

  1. Close Android Studio
  2. Open android studio, but be ready
  3. Once you see "loading project", click cancel. (this will only appear for seconds on a fast machine)
  4. The SDK download window appeared!
Eric Nelson
  • 337
  • 4
  • 15
3

If Android Studio directly opening your project instead of setup window, then just close the windows of all projects. Now you will able to see the startup window. If SDK is missing then it will provide option to download SDK and other required tools.

It works for me.

Abeer Iqbal
  • 1,256
  • 10
  • 10
1
  1. Create SDK folder at \Android\Sdk
  2. Close any project which is already open in Android studio

Android Studio setup wizard will appear and perform the needed installation.

Akash
  • 51
  • 3
1
  • Press escape to close all errors.
  • close project
  • Android studio will prompt to install SDK
  • Install the SDK and configure project
Muhammad
  • 381
  • 3
  • 10
0

just dont panic

close the whole application and restart your system

then open the android studio once again then it would ask itself to download the missing SDK

click on Download

your android studio is ready....

-1

1.Click on Configure

2.Then Choose Project Defaults

3.Click on Project Structure

4.Set android sdk path

You will find here "C:\User\YourPcname\AppData\Local\SDK"

Note: Sometime AppData may hidden if it will not show then enable show hidden content.

5.Apply Changes

6.Then Select Sdk From Configure option

7.Then Android sdk manager page is open

8.In bottom you will see Install packages option

9.Install them and enjoy.

Joe
  • 8,868
  • 8
  • 37
  • 59
Vishal
  • 1