Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I can't get IntelliJ to recognise my Android SDK

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!!!!

like image 940
Alec Armstrong Avatar asked Mar 09 '12 01:03

Alec Armstrong


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.

How do I fix Android SDK not found?

Quick fix: Go to the Tools –> SDK manager –> SDK tools. Deselect Hide obsolete packages option on the right bottom and further install Android SDK Tools(obsolete). A new folder named Tools is now generated in the SDK directory. (C:\Users\..

How do I fix SDK location not found?

Close the current project and you'll see a pop-up with a dialog which will then proceed to Configure option. Configure -> Project Defaults -> Project Structure -> SDKs on left column -> Android SDK Home Path -> give the exact path as you did on local. properties and select Valid Target.

How do I know if Android SDK is installed?

Navigate to “Appearance & Behavior” > “System Settings” > “Android SDK” and now you can see the SDK versions that were installed in the “API Level” and “Name” columns (focus on “API Level”).


1 Answers

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:

  • https://www.jetbrains.com/idea/webhelp/configuring-global-project-and-module-sdks.html
like image 88
Rui Lopes Avatar answered Oct 02 '22 23:10

Rui Lopes