2

I'm very new to Maven, and on top of that I'm forced to use the IntelliJ which is new environment as well for me.

While building project with the Maven in IntelliJ 12.0.3 I'm getting compilation error:

Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.5.0:generate-sources (default-generate-sources) on project merchant: Execution default-generate-sources of goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.5.0:generate-sources failed: Path "C:\adt-bundle-windows-x86_64\adt-bundle-windows\sdk\platform-tools\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. -> [Help 1]

I added to Environmental variables: ANDROID_HOME with parameter: C:...\sdk\platform-tools but it seems that it's still incorrect.

Yesterday, when this error occured on a different branch I was using, one guy was able to fix it with some settings in the File --> Settings --> Maven --> Runner --> Add Maven Property. I've checked the list there but it was not conclusive :(. I think he added a property name and the value by hand.

Thanks for your help!

1
  • can you post your pom.xml? mat's solution works for me.
    – fxp
    Commented Aug 23, 2013 at 15:47

1 Answer 1

3

You can add the Android-SDK-Path to the commandline:

In Settings -> Maven -> Runner add a propery with

Name  = android.sdk.path
Value = <path to your android-sdk>

This fixed the Problem for me

1
  • I added that property (IntelliJ 12.1.3) but it's still not working.
    – TOUDIdel
    Commented May 24, 2013 at 10:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .