Benny
Benny

Reputation: 3917

Android Maven Project on Jenkins

I have tried using Jenkins with my Android project which I'm using Maven for. I have tried following this tutorial except the emulator part since I don't have any tests (yet). http://vitorbaptista.com/continuous-integration-for-android-apps-with-jenkins-and-maven3/

I am getting the following error when I try building my project in Jenkins:

message : Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.3.0:generate-sources (default-generate-sources) on project ....: Execution default-generate-sources of goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.3.0:generate-sources failed: Could not find tool 'aapt'. 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. cause : Execution default-generate-sources of goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.3.0:generate-sources failed: Could not find tool 'aapt'. 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.

Here is my configuration for Android and Maven:

Jenkins enter image description here enter image description here (that folder is the right one, I've checked a million times) enter image description here

Project

enter image description here

I have tried even chmod 777'ing the path to my SDK directory in the case Jenkins doesn't have access.

Any ideas?

Upvotes: 4

Views: 3014

Answers (1)

Benny
Benny

Reputation: 3917

Unfortunately, it was as simple as installing the platform tools. Since I have always worked with the SDK via UI, I haven't thought about the installation of the platform tools. After installing the platform tools, everything built.

The command was as simple as:

[sdkdir]/tools/android update sdk --no-ui --filter platform-tool

Upvotes: 6

Related Questions