I can't get IntelliJ to recognise my Android SDK

Alec Armstrong picture Alec Armstrong · Mar 9, 2012 · Viewed 63.2k times · Source

I am trying to make Android programs using IntelliJ. Unfortunately, I cannot get the Android SDK to be recognised on IntelliJ. (I.e. Eclipse has Android SDK Manager installed just fine.)

I select create new project from scratch. I give the project a name and select make Android module. Create source directory (next).

The computer then shows Android SDK none. I click the ellipses (...) and the program can see my JDK files.

I click on the + and select Android SDK.

I then find the directory c:\Program Files (x86)\Android\android-sdk.

However, when I click OK a dialog box appears stating "Please select Java SDK". It only gives me the choice of 1.6 (and not the other one 1.7). I then press OK for 1.6.

Finally the computer then reports it cannot find any Android targets in this SDK.

Please help!!!!

Answer

Rui Lopes picture Rui Lopes · Feb 9, 2014

Before creating a new Android Project on IntelliJ Idea, you need to configure the Java and Android Development Kits at the IDE level.

Assuming you already installed the JDK and the Android SDK and you just launched IntelliJ (I'm using version 13.0.2):

  1. Press Ctrl+Shift+Alt+S (to access the Project Structure dialog)
  2. On the left navigation pane, click on 'Project Settings->Project'
  3. On the right navigation pane, you should see a drop-down list displaying '<No SDK>'
  4. Click on 'New', select 'JDK' and choose the path to your JDK
  5. Click on 'New', select 'Android SDK' and choose the path to your Android SDK

Please note you have to define the JDK before the Android SDK.

This procedure is documented at: