Android SDK missing on Intellij IDEA - android

I just can't figure out how to install Android SDK to create new Android project on IntelliJ properly.
While trying to make a new project, red bold warning appears:
Your Android SDK is missing, out of date, or missing templates. Please ensure you are using SDK version 24.0.2 or later.
The problem is, I don't really know how to fix it. Where could I eventually find accurate SDK and how to fix that?
Thanks in advance!

If you never installed an Android SDK, you will first need to install it, as explained here:
https://www.jetbrains.com/help/idea/prerequisites-for-android-development.html
Then, go to File -> Project Structure -> Platform Settings: SDKs.
Click on "+" and select Android SDK.
A dialog will open in which you should select the directory containing the Android SDK.
After you add it, you will be able to create an Android project in IntelliJ.

Follow My below steps to fix your issue :
Click On SDK Manager
Click on Launch Standalone SDK Manger
Update All the available support Libraries & tools

"Configure -> Project Defaults -> Project Structure -> SDKs -> +" add here path to your Android SDK.

Related

Cannot run my app, asking to select Android SDK

Today I've installed Android Studio Canary 1
Now I cannot run my app. This following dialog appears.
I've already set the right SDK location through File-> Project Structure-> Android SDK location.
Expecting your help to solve this problem.
Warning Dialog image:
Go to project structure settings and set Source Compatibility and Target Compatibility to your current java development kit version:
Just you need to sync your project file with your gradle file.
File -> Sync Project with Gradle Files
I tried every answer in this post but my problem only got resolved when I made these steps:
File -> Close project -> Remove project -> Open existing project (same
project)
Maybe this will save a morning to another person with the same bug.
EDIT
This happened to me a lot on a MacBook. After I posted this answer it just kept happening so what I did was:
uninstall the Android Studio version I had from the App Store;
download the desktop stable version from Android Studio website;
start using the desktop version of Android Studio.
Never happened again.
Sometimes the SDK path will be incorrectly configured. You would need to fix it.
To Settings/Preferences( command + , on mac).
Search for SDK
Under Android SDK, click on edit and point it the root of sdk directory on your file system. (If ther is no SDk installed then install in from the below list).
i suggest you go to build.gradle and sync again.
Or Tools -> Android -> Sync Project with Gradle Files (Android 3+)
You need to insall SDK api 19 check this out.
https://developer.android.com/studio/releases/platforms
Go to sdk manager and install sdk according to your device and check your device api. Example if your device is jellybean then install api 19 sdk.
Go to Tools> Android > SDK Manager and make sure you have selected default Setting under System Setting. In this image I have selected Android 7.1.1 as default SDK
Just click on the button ..."Sync Project with gradle file"
Error will be remove
I had the same problem and what it worked for me was just sync with gradle.
I just did what I've found in this similar question:
How do I "select Android SDK" in Android Studio?
The original answer:
go to build.gradle and click sync now. Then it worked.
Update :
File -> Sync Project with Gradle Files (Android Studio 3.1.1)
Tools -> Android -> Sync Project with Gradle Files (Android Studio
3.0.1) Or You can click on the icon from the toolbar.
Sync Project Icon
This answer may not help works for later version as Android studio Team work on making the tool more better, the way to sync may be
different in the next version of Android Studio.
COMMON WAY that may helps is try to sync project and then Invalidate
Caches and Restart Android Studio.
Solution for Android Studio 3.1.2
Before that, by the way, I had invalidated cache and restarted too, but it didn't work.
Please, try and let us know.
P.S.
I had this problem after I imported a project from Git, just in case someone would like to replicate.

Cannot create new AVD Device

i am using android studio version 0.8.2,
i am trying to create an avd, but the OK button cannot be pressed.
didn't find anything relevant to my version online.
You have to setup everything properly, if the cpu is not able to choose, you need to install the corresponding package in SDK manager
check my answer here:
https://stackoverflow.com/a/24980033/2777381
Do you install gradle? Make sure your Android Studio installs the gradle when you first start and create a project.
Also make sure File -> Project Structure -> SDKs list your Android SDK and you have given the right PATH there.
Also check:
I can't see AVD manager window in android studio 0.4.0
AVD not working correctly in android studio

Android SDK is missing, out of date, or is missing templates. Please ensure you are using SDK version 22 or later

Possible duplicate, I just download a Android Studio Zip file like Eclipse, as I opened getting this error.
But problem is how to update it?
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.
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
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.
I was able to trigger an SDK download like this:
Close Android Studio
Open android studio, but be ready
Once you see "loading project", click cancel. (this will only appear for seconds on a fast machine)
The SDK download window appeared!
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.
Create SDK folder at \Android\Sdk
Close any project which is already open in Android studio
Android Studio setup wizard will appear and perform the needed installation.
Press escape to close all errors.
close project
Android studio will prompt to install SDK
Install the SDK and configure project
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.

android studio 0.4.2 + gradle + Android Source code

I'm trying to attach the android source code to my gradle project using Android Studio. The problem is that the SDK tab does not appear if you are using a gradle project and I can not attach the source code. I tried with version 0.4.3 and does not work.
Any idea or work arround?
EDIT: I've attach a capture with my project structure without sdk option.
Thank you,
The short explanation is that Android Studio has added some functionality to try to automatically manage IntelliJ SDKs; if you give it a JDK path and Android SDK path in Project Structure > Android SDK, it will automatically create a Java SDK and Android SDKs for each API level you have installed in your Android SDK. The problem is, if it creates an Android SDK for an API level that doesn't have the sources downloaded, if you go into SDK Manager later and download the source, it doesn't pick that up and update its SDK. I've filed https://code.google.com/p/android/issues/detail?id=65230 for this. In that bug I list two workarounds, which I'll explain here:
You can actually get at the SDKs panel you're looking for. We hide it if you have a Gradle-based project open since we want Gradle-based project users to not have to worry about it, but since we also support IntelliJ-style projects that use its internal builder, it's still possible to access it so those users will be able to make their projects work. You can get at this panel if you access Project Structure without a project open. To do so:
Close all open projects
From the Welcome to Android Studio screen, go to Configure > Project Defaults > Project Structure > SDKs
Choose the appropriate Android API SDK that you installed source for, and go to Sourcepath panel
Press the + button, and choose the source directory.
If you're having trouble following that, let me know and I can post screenshots.
Another approach would be to blow away all of Android Studio's auto-created SDKs and let it rebuild them. To do that
Exit Android Studio
Delete the jdk.table.xml file, which on MacOS will be in your home directory under Library/Preferences/AndroidStudioPreview
Relaunch Android Studio
Go into Project Structure (either from the Welcome screen or from a project), and choose the Android SDK tab
Make sure the Android SDK location and JDK location are correct.
Check the compileSdkVersion in your build.gradle file and download the "Source for Android SDK" for respective API from Android SDK Manager.
SDK manager icon will be available on Android Studio tool bar.
Nothing else needs to be done.
Note : Source Code for Android SDK is only available for and after API 13 .

android studio new project missing folders

I have created a new project using the latest version of Android Studio (0.2.2), this is a fresh install of studio. When I am in the project explorer view, it fails to show me any folders for my project. I should see a root project folder, and within it the .idea, gradle, and module folders, but they are not showing.
Here is what I expect to see (taken from the sample project created on first boot):
But here is what I see immediately after the project's creation:
I cannot figure out how to expose my project's folders! I do not want to develop without the project explorer, it's simply too much of a hassle. Did I create the project incorrectly, or am I missing some not-so-obvious setting somewhere?
Thanks.
The problem here is that I assumed android studio would create a module for the application. I assumed this because it asked me at the beginning for app name, module name, package, sdk info etc.
This assumption turned out to be false. You must create your first module manually through File > Project Structure. After that is done, the project explorer shows the files.
File -> Project Structure -> Modules
Add Button (Green plus button) click -> New Module Select
New Module window -> "Content root" change path button click to select "Project root file path"
Apply to change save and "OK" button exit.
In the project Explorer there is a drop down menu where you have selected project, now change it to project files.
I hope this will solve your problem. reply if it didn't.
You have created a new gradle project not a new android project.
Update your android studio tools to 0.2.3 - Go to Help menu - select check for update.
then Update your android sdk tools, android support repository, android support library and android build tools using android sdk manager.
And update some configuration in project structure. Go to File menu->project structure -> in projects tab select Android SDK as default sdk and in SDKs tab set correct path to updated android sdk.
Now restart android studio and try to create a new project and it should work fine.
(Noted for posterity) I had a similar issue come up recently, when importing an Eclipse android project. The issue was that the source folder wasn't added as such. I had to manually go into Project Structure -> Modules -> Sources and make sure that the "src" folder wasn't excluded and was marked a source folder.
Although this question is asked years ago. But now following simple solution worked for me.
Clicking 'Sync Project With Gradle files' makes all directories visible.
I had this exact same issue, there are some problem if you upgrade from 0.1.9 version to 0.2.0 in Windows.
Android Studio 0.2.0 Release
The solution (which worked for me) was to completely uninstall Android Studio and reinstall the 0.2.0 version.
I had the same problem today. Additionally, the IDE posted an "Assertion Error" into its event log.
Downloading and reinstalling the preview version, then applying the patch to 0.2.6 worked for me.
Change the SDK to a level that you have installed in the SDK manager. The SDK manager can be accessed from Tools -> Android -> SDK Manager. For me, Android Studio was packaged with API Level 17 but the new project wizard tried to target API Level 18.

Categories

Resources