[EnvInject] - Loading node environment variables. Building in workspace /Users/Shared/Jenkins/Home/jobs/Automated Testing Check/workspace > git rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository > git config remote.origin.url https://github.com/jpratik21/Testing # timeout=10 Fetching upstream changes from https://github.com/jpratik21/Testing > git --version # timeout=10 using .gitcredentials to set credentials > git config --local credential.helper store --file=/Users/Shared/Jenkins/tmp/git6483021201942154298.credentials # timeout=10 > git -c core.askpass=true fetch --tags --progress https://github.com/jpratik21/Testing +refs/heads/*:refs/remotes/origin/* > git config --local --remove-section credential # timeout=10 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10 Checking out Revision 3a3c7825ebf737c3193903368914a4b3c9528a4f (refs/remotes/origin/master) > git config core.sparsecheckout # timeout=10 > git checkout -f 3a3c7825ebf737c3193903368914a4b3c9528a4f > git rev-list 3a3c7825ebf737c3193903368914a4b3c9528a4f # timeout=10 [Gradle] - Launching build. [workspace] $ "/Users/Shared/Jenkins/Home/jobs/Automated Testing Check/workspace/gradlew" clean buildFAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring project ':app'. > The SDK directory '/Users/jpratik/Library/Android/sdk' does not exist. * 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: 9.163 secs
Build step 'Invoke Gradle script' changed build result to FAILURE Build step 'Invoke Gradle script' marked build as failure [android-lint] Skipping publisher since build result is FAILURE Archiving artifacts Recording test resultsERROR: Publisher 'Publish JUnit test result report' failed: No test report files were found. Configuration error? Finished: FAILUREMy screenshot attached says that the android SDK does exist but jenkins says it doesn't. Tried with ENV var:ANDROID_HOME too / ski.dir=pathtosdk...Any help ??????
After adding android-sdk-manager plugin to the build.gradle, it says permission denied. Can someone help me in adding more permission ?
Started by user anonymous [EnvInject] - Loading node environment variables. Building in workspace /Users/Shared/Jenkins/Home/jobs/Automated Testing Check/workspace > git rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository > git config remote.origin.url https://github.com/jpratik21/Testing # timeout=10 Fetching upstream changes from https://github.com/jpratik21/Testing
> git --version # timeout=10 using .gitcredentials to set credentials > git config --local credential.helper store --file=/Users/Shared/Jenkins/tmp/git495701130454661106.credentials # timeout=10 > git -c core.askpass=true fetch --tags --progress https://github.com/jpratik21/Testing +refs/heads/*:refs/remotes/origin/* > git config --local --remove-section credential # timeout=10 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10 Checking out Revision 326d20feb5be2e81cc51f954e7c0a7453283a9f0 (refs/remotes/origin/master) > git config core.sparsecheckout # timeout=10 > git checkout -f 326d20feb5be2e81cc51f954e7c0a7453283a9f0 > git rev-list 3a3c7825ebf737c3193903368914a4b3c9528a4f # timeout=10 [Gradle] - Launching build. [workspace] $ "/Users/Shared/Jenkins/Home/jobs/Automated Testing Check/workspace/gradlew" clean buildDownload https://jcenter.bintray.com/com/jakewharton/sdkmanager/gradle-plugin/0.12.0/gradle-plugin-0.12.0.pomDownload https://jcenter.bintray.com/org/rauschig/jarchivelib/0.6.0/jarchivelib-0.6.0.pom Download https://jcenter.bintray.com/commons-io/commons-io/2.4/commons-io-2.4.pom Download https://jcenter.bintray.com/org/apache/commons/commons-parent/25/commons-parent-25.pom Download https://jcenter.bintray.com/org/apache/apache/9/apache-9.pom Download https://jcenter.bintray.com/org/apache/commons/commons-compress/1.8/commons-compress-1.8.pom Download https://jcenter.bintray.com/org/tukaani/xz/1.5/xz-1.5.pomDownload https://jcenter.bintray.com/com/jakewharton/sdkmanager/gradle-plugin/0.12.0/gradle-plugin-0.12.0.jarDownload https://jcenter.bintray.com/org/rauschig/jarchivelib/0.6.0/jarchivelib-0.6.0.jar Download https://jcenter.bintray.com/commons-io/commons-io/2.4/commons-io-2.4.jarAndroid SDK not found. Downloading... FAILURE: Build failed with an exception. * Where: Build file '/Users/Shared/Jenkins/Home/jobs/Automated Testing Check/workspace/build.gradle' line: 17 * What went wrong: A problem occurred evaluating root project 'workspace'. > Failed to apply plugin [id 'android-sdk-manager'] > /Users/jpratik/Library/Android/android-sdk.temp (Permission denied) * 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: 12.369 secs Build step 'Invoke Gradle script' changed build result to FAILURE Build step 'Invoke Gradle script' marked build as failure [android-lint] Skipping publisher since build result is FAILURE Archiving artifacts
Recording test results ERROR: Publisher 'Publish JUnit test result report' failed: No test report files were found. Configuration error? Finished: FAILURE
It's due to permission problem. So it can be fixed by 2 ways
1. Run below commands in ~/Library/ path by using terminal
chmod 777
at /Users/username/Library/. Check permission by execute ls -s command
So /Users/username/Library/ should now show the permission like this drwxr-xr-x@
2. Second way
Run below command on Terminal to unhide library inside File explorer
chflags nohidden ~/Library/
So now navigate & right click on Library folder -> Get info -> Scroll down -> change permission on permission in dialog
Now run jerkin, it should be able to access the sdk directory inside Library
I fixed it using: