And there was pain…
I imported an existing Android project into IntelliJ Idea Community Edition 10.5.1. Some things started complaining “Please select Android SDK.”
The help pages are out of date; they say to do this in the Android facet settings. It isn’t there.
Here is the secret do-things-right button: Module settings (ctrl-alt-shift-S), then pick Project, and then you need to change the Project SDK (1). To teach Idea where your Android SDK is, click New, and lo! There it is! The Android SDK option!
Choose Android SDK, and then select the home directory of your Android SDK installation. It will then ask you to choose a target API level. Now, the Android SDK is set.
The code still didn’t compile and the Run task still complained “Please select Android SDK.” Strangely, it seemed to have lost the SDK selection. I restarted Idea, opened the project structure options, and chose the Android SDK again. This time in “Edit Run Configurations”, I was able to select the virtual device to run on.
If you know a better way to accomplish this setup, please comment.
(1) You could follow these steps at the module level, too.