Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ IDEA - Android JDK doesn't work

I've just installed IntelliJ IDEA 10.0.0.2 Community edition
I've installed Android SDK ... (C:\Program Files\Android\android-sdk-windows)

I want to make a new android project, so I a create a new project, select Android Module, next , next...

Then when i need to choose the JDK, I go to the android folder, and when i try to choose it, I get this error:

The selected directory is not a valid home for JSDK

What am I doing wrong ? what can i do to fix this ?

I Installed android SDK with all the updates
When I choose IntelliJ IDEA Plugin SDK i get:

The selected directory is not a valid home for IntelliJ IDEA Plugin SDK

EDIT:

Still not solved...
I've already chose the SDK itself and chose android 2.2 Platform when creating the project.

Can't load the JDK files. So i won't me compile, i get this error

Cannot start compiler: the SDK is not specified for module "blah". Specify the SDK at Project Structure dialog.

like image 466
Yochai Timmer Avatar asked Feb 19 '11 21:02

Yochai Timmer


1 Answers

To develop Android applications in IntelliJ IDEA you need to set both Java SDK (JSDK) and Android SDK:

  • Configuring Project SDK
  • Java SDK
  • Setting Android SDK/Platform

You also need to run SDK Manager application and download Android platforms which you are going to use.

Note that you can detach all the jars from the JSDK configuration in IDEA if you are going to use it only for Android, this will help with the code completion so that only classes available in Android will be suggested by the IDE.

I also recommend to read the following tutorials:

  • Developing applications for Android in IntelliJ IDEA
  • Developing Android applications on the base of existing sources

EDIT:

Configuring project's link has been updated

like image 116
CrazyCoder Avatar answered Oct 10 '22 13:10

CrazyCoder