简体   繁体   中英

Error in building Gradle project using Jenkins

Hi I am building a java project using gradle in jenkins but getting below error.Please help me as I am a very beginner with Jenkins+gradle+sonar

Checking the license for package Android SDK Build-Tools 28.0.3 in C:\tools\android\sdk\licenses
License for package Android SDK Build-Tools 28.0.3 accepted.
Preparing "Install Android SDK Build-Tools 28.0.3 (revision: 28.0.3)".
Warning: Failed to read or create install properties file.
Checking the license for package Android SDK Platform 28 in C:\tools\android\sdk\licenses
License for package Android SDK Platform 28 accepted.
Preparing "Install Android SDK Platform 28 (revision: 6)".
Warning: Failed to read or create install properties file.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> Failed to install the following SDK components:
      platform-tools Android SDK Platform-Tools
      patcher;v4 SDK Patch Applier v4
      build-tools;28.0.3 Android SDK Build-Tools 28.0.3
      emulator Android Emulator
      tools Android SDK Tools
      platforms;android-28 Android SDK Platform 28
  Install the missing components using the SDK manager in Android Studio.


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

* Get more help at https://help.gradle.org

BUILD FAILED in 7s
Build step 'Invoke Gradle script' changed build result to FAILURE
Build step 'Invoke Gradle script' marked build as failure
Finished: FAILURE

Where does this message appears? From Gradle or from Jenkins? In any case the environment that Jenkins uses needs to have access to the tools needed to build the application. In this case it seems that some additional tools of the Android Studio need to be installed. Use the SDK Manager of Android Studio to install them.

platform-tools Android SDK Platform-Tools

patcher;v4 SDK Patch Applier v4

build-tools;28.0.3 Android SDK Build-Tools 28.0.3

emulator Android Emulator

tools Android SDK Tools

platforms;android-28 Android SDK Platform 28

Install the missing components using the SDK manager in Android Studio.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM