Android SDK is missing, out of date, or is missing templates. Please ensure you are using SDK version 22 or later
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
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.
Here's a better approach where you don't have to delete/move anything for Android Studio 3.+.
- Open Android Studio and click cancel/ignore for error prompts on missing SDK for each project.
- Close all your open projects. You can do this by
File > Close Project
. - After you do step 1 for all projects, the Welcome screen appears.
- 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.