Reputation: 49221
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.
Upvotes: 16
Views: 49843
Reputation: 401877
To develop Android applications in IntelliJ IDEA you need to set both Java SDK (JSDK) and Android SDK:
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:
Configuring project's link has been updated
Upvotes: 25
Reputation: 520
In my case, I needed to add support for android, so, I searched for android in the plugins settings.
Upvotes: 0
Reputation: 121
Fixed! I needed to run IntelliJ as Administrator IDEA. Now it will approve my Android SDK directory of "C:\Program Files (x86)\Android\android-sdk"
Upvotes: -1
Reputation: 4936
I've got the same problem with version 12 on linux, Android module does not show java sdk location and android sdk location selection fails because java sdk is not set. I've solved by making a java project, that lets me select java sdk and android sdk (strange right?), after making such a project I can make an android project because android sdk is now configured
Upvotes: 1
Reputation: 79
My installation path was "C:\Users\User\AppData\Local\Android\android-sdk." That confused IDEA since it doesn't seem to be able to see hidden folders, even when typing in the full path. Bummer...I fixed it though, by setting AppData as visible.
Upvotes: 7
Reputation: 9476
Make sure you have installed JDK 1.5 or 1.6 (1.7 is not works for some reason with Android SDK). I had the same problem ("The selected directory is not a valid home for Android SDK"), but after installing 1.6 JSDK - it`s work for me.
Upvotes: 1
Reputation: 51
I just wasted a whole lot of time on this problem. My work station is running IntelliJ Ultimate 11 on Windows 7 64-bit. I was setting up my first Android project. Therefore, no SDKs were configured. First I selected the JDK, which was a no-brainer (C:\ProgramFiles (x86)\Java\jdk1.6.0_30). Next comes the part where you need to specify the Android SDK. First you click the elipsis ("...") and then click "Add New". Now here's the kicker... If you look carefully at the dialog box, you'll notice that "Configure new JSDK" is highlighted by default. What you need to do is change the selection to "Android SDK". Now you can select the directory of your Android SDK and you won't get that stupid error message.
I literally wasted about a half an hour before I realized why the app kept telling me "This is not a valid SDK directory." Hopefully this will help someone else having the same problem.
Don here: I had the same trouble in Windows 64 with 11.1.2 and 64bit java. found that only by clicking on the left window could I register my Android SDK.
Upvotes: 5
Reputation: 88
Click the + symbol in the left most pane in the Select android sdk window during the creation of the project and then select the android SDK (default= c/program files/android/android-sdk)
Upvotes: 2
Reputation: 49221
In the JDK part you need to choose the JAVA JDK that was downloaded. (not the android)
C:\Program Files\Java\jdk1.6.0_24\
Upvotes: 1
Reputation: 11727
I've spent 30 minutes solving a foolish problem
For IntelliJ & Android on Linux.
If the "Android SDK" Menu comes up with a red 'No Android SDK' Click the browse button to the RIGHT of the drop down. - Its a different layout in Linux to Windows.
Upvotes: 0
Reputation: 11
If you right click in the leftmost window you can create a new Android Plugin or some such. I was just fighting with this myself. I have never used IntelliJ before and really their docs are out of date. Apparently not up to the current version.
Upvotes: 1
Reputation: 2186
When you first create Android project/module, you must choose JDK, for this click "+" and select "JSDK" in menu, then select where your Java SDK is, for instance "c:\Program Files\Java\jdk1.6.0_20". Then click "Next" and in "SDK Properties" panel click "New" and select path to your Android SDK (a directory where "SDK Manager.exe" is).
Upvotes: 3
Reputation: 5828
I had a real hard time seeing how to do this on a mac, since you can't download the jdk from sun's site
@Szabolcs Berecz @Yochai On a mac, you'll need to get the source as described here:
or just jump to the download here:
Then it stored in this location: 1.6.x /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/src.jar
Upvotes: 1
Reputation: 4091
JSDK is the Java SDK. On my Debian it's under /usr/lib/jvm/java-6-sun
Upvotes: 8