7

I have been working on Android Studio for a while now. But today when I tried to create a new project, I got the following error message:

Your Android SDK is out of date or is missing templates. Please ensure you are using SDK version 22 or later. You can configure your SDK via Configure | Project Defaults | Project Structure | SDKs

I upgraded my SDK tools, android studio. I have also configured my sdk location in studio as per the message, but to no avail.

SDK Manager

Android Studio

jww
  • 97,681
  • 90
  • 411
  • 885
Ankit Garg
  • 709
  • 1
  • 11
  • 26
  • If you close your project, then go to "Configure | Project Defaults | Project Structure | SDKs", what are the SDKs listed there? – Siva Velusamy May 29 '13 at 14:46
  • It lists all the sdks that I have mapped. It list sdk of Android studio and also I have downloaded android sdk separately and this also gets reflected as I tried to map it. – Ankit Garg May 30 '13 at 04:43
  • This was basically a path issue. Once JAVA_HOME was set properly, this error disappeared. This PATH variable was needed for SDK itself and not for any project. – Ankit Garg Apr 15 '14 at 10:17

5 Answers5

14

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

JafarKhQ
  • 8,676
  • 3
  • 35
  • 45
  • 1
    If you have an open project, do `File` > `Close Project` to get back to the welcome screen and trigger the SDK download. – Kenny Worden Jul 12 '17 at 04:06
3

SDK files are not included in the Android Studio distribution package android-studio-ide-135.1538390-windows.zip. You have to manually add them, for instance from the adt-bundle-windows-x86-20140702.zip file.

  • yes, just download the standalone sdk package under the GET THE SDK FOR AN EXISTING IDE section in this: https://developer.android.com/sdk/index.html#download – Benkax Dec 08 '14 at 03:45
1

In the case: if your project sdk is already set and was running properly.

and after that it gives error like: "please select your sdk" then just copy same android sdk folder to different folder and set that new android sdk path to your project and rebuild your project,it will fix the issue, then again change your project android sdk path to old path and rebuild project.

0

I had the same issue the i came to understand that the android studio was not able to create folder so i ran the studio as sudo

cd /opt/android-studio/bin then run sudo bash studio.sh

Arun Killu
  • 13,581
  • 5
  • 34
  • 61
0

Had same issue with Studio 2.0 on Ubuntu 14.04. What actually helped me: close the Studio; rename SDK folder; open the Studio; enter a new path in prompt dialog.

Biggemot
  • 228
  • 2
  • 6