I encountered this error after installing Intellij IDEA Ultimate 14.1 and opening an existing Android project I had created using Android Studio. It turns out I just had to add the Android SDK to my list of SDKs and fix the project/module SDK settings. This is how I did it:
Go to File -> Project Structure
. Click on the Project tab under Project Settings. Under Project SDK click on New -> Android SDK
.
Now select the existing directory for your Android SDK. In my case it was in this folder:
C:\Users\<windows username>\AppData\Local\Android\android-sdk
Click Ok. A menu pops up asking you to set the Java SDK + Build target. You can either change these or leave it as its defaults and hit Ok. You should now see "Android API XX Platform" in the Project SDK dropdown. Click apply on the bottom. Then go to the Modules tab under Project Settings and click on the folders in the modules listing.
For each folder go to the dependencies tab and change the Module SDK to the new Android SDK and click apply. Then click Ok to close the Project Structure dialog.
After doing the above, my project was fixed.