Android Startup Problem with IntelliJ Idea 11 and Maven

By | 25. März 2012

I’ve got my brand new MacBook today, yeah! That’s something good. But as continued to develop an Android project with a fresh installation of Lion and IntelliJ IDEA 11, I’ve got this exception:

[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Path "/opt/android-sdk-linux/platforms" is not a directory. Please provide a proper Android SDK directory path as configuration parameter ... in the plugin . As an alternative, you may add the parameter to commandline: -Dandroid.sdk.path=... or set environment variable ANDROID_HOME.
[INFO] ------------------------------------------------------------------------
[INFO] Trace
com.jayway.maven.plugins.android.InvalidSdkException: Path "/opt/android-sdk-linux/platforms" is not a directory. Please provide a proper Android SDK directory path as configuration parameter ... in the plugin . As an alternative, you may add the parameter to commandline: -Dandroid.sdk.path=... or set environment variable ANDROID_HOME.
	at com.jayway.maven.plugins.android.AndroidSdk.assertPathIsDirectory(AndroidSdk.java:130)
	at com.jayway.maven.plugins.android.AndroidSdk.getPlatformDirectories(AndroidSdk.java:293)
	at com.jayway.maven.plugins.android.AndroidSdk.findAvailablePlatforms(AndroidSdk.java:268)

I’ve pointed the ANDROID_HOME environment variable to my Android SDK in /Library/Android, but it didn’t work. As I’am too lazy to configure the -Dandroid.sdk.path argument for each run configuration, I was pretty happy to find another, quite simple solution for this problem: The Android plugin expects the SDK to be installed in /opt/android-sdk-linux/platforms. So, just symlink it…

sudo ln -s /Library/Android /opt/android-sdk-linux

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.