Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

intelliJ IDEA 13 error: please select Android SDK

I have installed Android SDK 22.3 and JDK 1.7 update 21 on Win7 x64. Now I created an empty android application project using intelliJ 13.0.1 (also use Emulator as target device) and tried to build the project, but encountered the 'Error: Please select Android SDK'.

So I choose Emulator as the Target Device, but I could not select my AVD, as there is a Error: Cannot find any configured Android SDK.

In the Project Structure, it clearly shows 'Android 4.4.2 platform' as Project SDK. So I am totally confused, don't know how to resolve the issue.

ps. I was upgrading intelliJ 12.1.2 to intelliJ 13.0.1, and all the settings were automatically inherited from 12.1.2 when launching 13.0.1, but it seems not all the settings were exactly copied over to 13.0.1, which is unexpected.

cheers

like image 479
daiyue Avatar asked Jan 12 '14 01:01

daiyue


People also ask

How do I select Android SDK for IntelliJ?

From the main menu, select File | Project Structure | Project Settings | Modules. Select the module for which you want to set an SDK and click Dependencies. If the necessary SDK is already defined in IntelliJ IDEA, select it from the Module SDK list.

Can I use IntelliJ for Android development?

Android Studio may be a better choice for businesses that develop primarily Android Applications. It is worth noting that Android Studio is based on IntelliJ IDEA, so for businesses that develop for multiple platforms, IntelliJ IDEA still offers some support for Android development in addition to other platforms.


2 Answers

My Problem: "please select Android SDK", But everything is okey :( -> I think one of IntelliJ file was crashed (after blue screen of death)

My resolution:

File -> Settings -> Android SDK -> Android SDK Location Edit -> Next, Next (Android SDK is up to date.), Finished

... and crashed file was repaired!

like image 193
rocciax Avatar answered Sep 18 '22 04:09

rocciax


I encountered this error after installing Intellij IDEA Ultimate 14.1 and opening an existing Android project I had created using Android Studio. It turns out I just had to add the Android SDK to my list of SDKs and fix the project/module SDK settings. This is how I did it:

Go to File -> Project Structure. Click on the Project tab under Project Settings. Under Project SDK click on New -> Android SDK.

Adding new Android SDK

Now select the existing directory for your Android SDK. In my case it was in this folder:

C:\Users\<windows username>\AppData\Local\Android\android-sdk

Click Ok. A menu pops up asking you to set the Java SDK + Build target. You can either change these or leave it as its defaults and hit Ok. You should now see "Android API XX Platform" in the Project SDK dropdown. Click apply on the bottom. Then go to the Modules tab under Project Settings and click on the folders in the modules listing.

Module List

For each folder go to the dependencies tab and change the Module SDK to the new Android SDK and click apply. Then click Ok to close the Project Structure dialog.

After doing the above, my project was fixed.

like image 29
Christian Wilkie Avatar answered Sep 17 '22 04:09

Christian Wilkie