Fix your Android IDE for SDK 17 and the Android Maven Plugin < 3.5.4

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 
   (default-generate-sources) on project tutorial: Execution default-generate-sources of 
   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]

After a quick search I found this really fine answer on StackOverflow and a bug report explaining how to fix this issue on my linux environment:

    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.

Weitere Artikel

Crossfit Open WOD 18.4

Crossfit Open WOD 18.3

Crossfit Open WOD 18.2

Crossfit Open WOD 18.1

Match only your own email in Evolution filters

Gronkh ist jetzt ein Rundfunksender...

Crossfit Regionals 2018 in Berlin

Crossfit Open 2018

Qutebrowser userscript for TT-RSS

Aufbau eines Hackintosh