29

I just recently updated my IntelliJ Idea installation on my Mac to 10.5. I had an Android project that I was working on in 10.0.3 and everything was working great. Now when I try to build the project I am getting an Error:

Information:Compilation completed with 1 error and 0 warnings
Information:1 error
Information:0 warnings
Error:Android SDK is not specified for module Project_Android
Kyle LeNeau
  • 1,038
  • 2
  • 12
  • 19

5 Answers5

61

It sounds like IntelliJ doesn't know where the Android SDK is.

Here is a step by step:

  1. From your existing project, go to 'File' -> 'Project Structure'
  2. Click 'Modules' entry from the 'Project Settings' group (on the left side)
  3. Click 'Android' module for your project
  4. Click 'New' where it says 'Android Platform'
  5. Point it to the Android SDK location that you have locally.
  6. Select an API version.
  7. Click 'Apply'

That should be it. Good luck!

Image added enter image description here

palaniraja
  • 10,432
  • 5
  • 43
  • 76
nicholas.hauschild
  • 42,483
  • 9
  • 127
  • 120
  • 5
    on your step 4, you say that we should be able to click on 'New' where it says 'Android Platform'. I don't see that. I see 'Is library project', and then structure and complier tabs. Any ideas? – b-ryce Aug 15 '11 at 20:36
  • 7
    I was having the same problem as bryce above. It turned out that I had read somewhere that I should specify my "Project SDK" as the JDK, which is wrong... it needs to be an Android SDK. To fix it, I went to Project Structure > Project Settings and created a "new Project SDK". Helpful instructions can be found [here](http://wiki.jetbrains.net/intellij/Developing_applications_for_Android_in_IntelliJ_IDEA). – Neil Traft Sep 30 '11 at 01:41
  • closing the project redirects you to the first screen, and it triggers sdk download too, on version 3.1.3 – HadesDX Jul 14 '18 at 15:59
18

As Neil Traft suggests, you also have to make it default project SDK as well. IntelliJ 13.1.3 screenshot

TrophyGeek
  • 5,902
  • 2
  • 36
  • 33
  • Hi, TrophyGeek: OK, I'm a noob! When I select the drop down I don't see anything for Android. I added the android sdk under platform settings and restarted Intelli-J as lyngbym said. What do I need to do to get the Android Google APIs into my list? – Patricia Jan 28 '15 at 00:48
  • 1
    Instead of IntelliJ, you should use Android Studio and Import the project. Android Studio is basically a customized IntelliJ specifically for Android. It's a little better at guiding you through things. – TrophyGeek Jan 28 '15 at 04:33
7

Please note that Android SDK configuration has changed in 10.5. Refer to the blog for details.

CrazyCoder
  • 389,263
  • 172
  • 990
  • 904
7

I was very confused by this as well. I was missing the android sdk under platform settings. enter image description here

After adding this configuration, it still didn't work until I restarted Intelli-J. Very confusing.

lyngbym
  • 669
  • 2
  • 10
  • 11
2

I got this same error when creating a new project with LibGDX 1.9.4 with the IntelliJ project option and opening it. Many of these answers are getting old, so here is confirmation from 2016!

The solution that worked for me was to go into the module settings and change to the Android SDK instead of the default Java SDK for the Android module:

  1. Right click on the project and select Open Module Settings.
  2. Select Modules under Project Settings.
  3. Select the Android module.
  4. Select the Dependencies tab.
  5. Choose the appropriate Android SDK instead of the Java SDK.

    • If the desired Android SDK is not present, go to the SDKs tab under Platform Settings and add the new Android SDK via the '+' button.

I was able to run the project after the Android SDK was set. Thanks to @nicholas.hauschild for guidance on this solution!

Solution is setting the android module with an Android SDK in the Module settings. IntelliJ IDEA 2016.2.4 Build #IC-162.2032.8, built on September 9, 2016 JRE: 1.8.0_112-release-b343 x86

George Pantazes
  • 1,039
  • 3
  • 12
  • 26