Android Studio - SDK outdated or missing templates

I downloaded Android Studio, fixed the JDK environment variable, but when I try to create a new project, I get an error

Your Android SDK is outdated or missing templates. Make sure you are using SDK version 22 or later.

I opened android.bat in the SDK, but he said that I was already running version 22.

Anyone else get this?

+62
java android android-studio
May 15, '13 at 22:23
source share
9 answers

This is because you already have the Android Developer Bundle SDK with eclipse installed. Just open your SDK manager in the ADT bundle and update the Android SDK Tools from 21.1 to 22, and you will be fine.

Worked for me.

+19
May 15, '13 at 23:21
source share

First of all, on Windows and Mac, individual tools and other SDK packages are stored in the Android Studio application directory.

Windows: \Users\<user>\AppData\Local\Android\android-studio\sdk\ Mac: /Applications/Android\ Studio.app/sdk/ 

Make sure your android-sdk path is correct and the sdk tool version is 22 or later.

Then open "Configure β†’ Standard Defaults β†’ Project Structure", install your sdk project in the Android SDK.

to use.

+7
May 16 '13 at 3:49
source share

As for me, I do the following:

  • Launch Eclipse -> Launch SDK -> Install Selected Packages
  • Eclipse β†’ Help β†’ check for updates β†’ update all
  • Android Studio β†’ configure β†’ Project Defaults β†’ Project Structure β†’ Click plus β†’ Android SDK β†’ enter the path to the same sdk that you use in eclipse (launch the SDK, and on the top panel you will see this path).
  • To apply
+6
May 16 '13 at 13:26
source share

I did all of the above and got ....missing templates blah blah . What worked for me is to go to Configure>Project Defaults>Project Structure>Project and select the Android SDK and then Configure>Project Defaults>Project Structure>SDKs display the Android SDK home path in the sdk folder in the ADT package (for me it was C:\Users\home\Toolbox\adt-bundle-windows-x86\sdk ).
Then I selected Android 4.1.2 and applied it, and it worked.
Then I went back to Configure>Project Defaults>Project Structure>SDKs , and then selected Android 4.2.2, and now it worked (strange though when I selected Android 4.2.2 for the first time, the Apply button was unavailable)

+4
May 16 '13 at 14:02
source share

I ran into this problem because I wanted to update it from the old version. In doing so, I downloaded the latest version from the Project Tools Site , then unpacked and copied my existing installation of Android Studio, which had an sdk folder inside.

Going back and looking at him, I see very clearly that there was a note that I had previously ignored:

NOTE. These .zip files do not contain a built-in SDK installation. If you have an existing Studio installation that contains the built-in SDK, if you upgrade by installing one of these zip codes, make sure that you also copy the SDK.

For OS X users, this means switching to the old version of Android Studio (if you have not already copied it) and right-clicking and choosing Show Package Contents , and then copy the sdk folder inside, then putting it in the new version of Android Studio.

If, like me, you already copied the old version, then you need to first download the old version that contains the SDK.

+2
Apr 05 '14 at 2:32
source share

Today they released a new sdk. You need to update it.

+1
May 15 '13 at 22:30
source share

I still clicked on this and thought it was due to what I configured incorrectly (which turned out to be the case). The error message is a bit confusing because I believe that they mean the version of the ADT tools, not the SDK. For example, Android 4.3 (near the latest) is 18.

As with the latest source for Android Studio (which you can clone here: https://android.googlesource.com/platform/tools/adt/idea ), this message is generated by NewProjectWizard. java near line 75 if TemplateManager.templatesAreValid () is false. And he checks that looking at the existence of the file [rootTemplatesFolder] / gradle / wrapper / gradlew.

It gets [rootTemplatesFolder] from the SDK (s) that you specified in the "Project Structure" settings for the default projects. In my case, I had a few predefined ones - both new ones pointing to the sdk directory, which (fortunately) was part of Android Studio, and several old ones that I had somewhere else. I shouldn't have included the old ones, but I'm new to this, and the GUI allowed me to do this. NewProjectWizard first checked the tool area that did not have this file, since the version for tools with it was older than version 22.

I had to use dtruss to view the Android Studio system calls to see where it is looking for this file, and at that moment I could tell you what my stupid problem is.

I have a few more notes about this, including a screenshot of my specific incorrect configuration, at http://www.nowherenearithaca.com/2013/08/solved-android-studio-and-your-android.html

Note. It seems you need to restart Android Studio for the β€œNew Project Settings” here to take effect.

+1
Aug 24 '13 at 14:26
source share

for ubuntu: Open the sdk manager from Android Studio or configuration. make sure you download or update the latest SDKs and build tools.

Set the sdk location as (your android sroid folder) It will download and install sdk

+1
Aug 20 '16 at 23:15
source share

Just update sdk with sdk manager this worked for me

-one
May 16 '13 at 2:19
source share



All Articles