Recently I started working on an Android App and after some initial problems with the new Android Studio based on IntelliJ I am back on a regular maven build process. But when setting up my project with the current version of the “old” Android IDE based on Eclipse and the Maven Android Plugin I stumbled upon some errors when trying to build the project:
Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.1.1:generate-sources (default-generate-sources) on project tutorial: Execution default-generate-sources of goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.1.1:generate-sources failed: Could not find tool 'aapt'. Please provide a proper Android SDK directory path as configuration parameter <sdk><path>...</path></sdk> in the plugin <configuration/>. As an alternative, you may add the parameter to commandline: -Dandroid.sdk.path=... or set environment variable ANDROID_HOME. -> [Help 1]
cd $ANDROID_HOME/platform-tools ln -s ../build-tools/android-4.2.2/aapt aapt ln -s ../build-tools/android-4.2.2/lib lib ln -s ../build-tools/android-4.2.2/aidl aidl
Because I am working on different machines, I had to fix this on at least one windows box too:
cd $ANDROID_HOME\platform-tools mklink aapt.exe ..\build-tools\android-4.2.2\aapt.exe mklink /D lib ..\build-tools\android-4.2.2\lib mklink aidl.exe ..\build-tools\android-4.2.2\aidl.exe
The original answer is available on StackOverflow and I also added my windows version of the commands as a comment to that answer.