Android Maven Project on Jenkins

I tried using Jenkins with my Android project, for which I am using Maven. I tried following this guide except for the emulator part, since I have no tests (yet). http://vitorbaptista.com/continuous-integration-for-android-apps-with-jenkins-and-maven3/

I get the following error when I try to create my project in Jenkins:

message: failed to complete the target com.jayway.maven.plugins.android.generation2: android-Maven-plugin: 3.3.0: generate-sources (default-generate-sources) in the project ....: Run default-generate- target sources com.jayway.maven.plugins.android.generation2: android-Maven-plugin: 3.3.0: generate-sources failed: Could not find the "aapt" tool. Please provide the correct Android SDK Directory Path as a configuration parameter ... in the plugin. Alternatively, you can add a parameter to the command line: -Dandroid.sdk.path = ... or set the ANDROID_HOME environment variable. reason: Default execution-generation-sources of the target com.jayway.maven.plugins.android.generation2: android-Maven-plugin: 3.3.0: generate-sources failed: Could not find the "aapt" tool. Please provide the correct Android SDK Directory Path as a configuration parameter ... in the plugin. Alternatively, you can add a parameter to the command line: -Dandroid.sdk.path = ... or set the ANDROID_HOME environment variable.

Here is my configuration for Android and Maven:

Jenkins enter image description hereenter image description here (this folder is correct, I checked a million times) enter image description here

Project

enter image description here

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

Any ideas?

+4
source share
1 answer

Unfortunately, it was as easy as installing platform tools. Since I always worked with the SDK through the interface, I did not think about installing platform tools. After installing the platform tools, everything is built.

The command was as simple as:

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

Source: https://habr.com/ru/post/1436659/


All Articles