Question

Situation:
I'm using Intellij Idea (13.1.1 on Win 8.1) and wanted to get started with Android development again. Therefore I just downloaded the latest Android SDK (also started the SDK-Manager and downloaded the suggested tools), created a new Android Application Module in Intellij and set the just downloaded Android SDK as Project SDK.

Now it looks as follows:

Project Settings:

Project -> Project SDK: Android API 19 Platform (java version "1.8.0")
Modules -> Dependencies: Module SDK: Project SDK
Modules -> Dependencies -> Export: Android API 19 Platform (java verion "1.8.0")

Platform Settings:

SDKs:
Name: Android API 19 Platform
Build target: Android 4.4.2
Java SDK: 1.8

Problem

..but whenever I try to run MyActivity.java, it throws these errors:

Error:Android Source Generator: Cannot parse SDK 'Android API 19 Platform': unknown target android-19
Error:Android Source Generator: [TestAndroid] Android SDK is invalid or not specified

Well, I googled a lot but I have no idea what I should do, since everything is set up right as I guess. (But if I use the downloaded sdk with Eclipse it works fine. Don't judge me, but I prefer using Intellij Idea).

Any ideas?

Was it helpful?

Solution

Just came across the same issue (same setup but running Win7), here's what solved it for me.

In the Project Settings dialog
Platform Settings -> SDKs: set Java SDK to 1.7 (didn't work with 1.8)
Project Settings -> Project: set Language level to 7.0 or below

OTHER TIPS

You need to change the IntelliJ android sdk location. I think the install location changed with Windows 8.

In IntelliJ, go to Project Structure -> SDKs. Change the Android SDK home location to where it is in your App Data folder. E.g. C:\Users\youruser\AppData\Local\Android\android-sdk

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top