worked
worked

Reputation: 5880

Jenkins not downloading Android SDK automatically

I'm running Jenkins locally on my mac and I can't seem to get Jenkins to download the Android SDK automatically. I'm not defining a path, and according to the documentation, Jenkins will auto download it. What am I missing here?

"The plugin will automatically download and install the Android SDK, if it's not already installed when a build starts."

Jenkin Log

[Gradle] - Launching build.
[workspace] $ /var/root/.jenkins/jobs/TestingBuild/workspace/gradlew clean
FAILURE: Build failed with an exception.

* Where:
Build file '/private/var/root/.jenkins/jobs/TestingBuild/workspace/app/build.gradle' line: 17

* What went wrong:
A problem occurred evaluating project ':app'.
> SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 19.418 secs
Build step 'Invoke Gradle script' changed build result to FAILURE
Build step 'Invoke Gradle script' marked build as failure
Finished: FAILURE

Upvotes: 2

Views: 1151

Answers (1)

worked
worked

Reputation: 5880

So two days later... problem solved. I had to place an instance of the android sdk at this location. /Users/Shared/Jenkins/Home/tools/android-sdk. I also set an Environment variable ANDROID_HOME with the same path. Here's a screenshot.

enter image description here

Upvotes: 1

Related Questions