Azure DevOps - Android : Error: D:\a\1\s\gradlew.bat failed with return code: 1

  • Thread starter Thread starter eng teong
  • Start date Start date
E

eng teong

Guest
Hi All,

We currently create a BUILD pipeline but getting the the error that mention
Error: D:\a\1\s\gradlew.bat failed with return code: 1

May I ask need how to solve it?


##[section]Starting: gradlew build
==============================================================================
Task : Gradle
Description : Build using a Gradle wrapper script
Version : 2.149.1
Author : Microsoft Corporation
Help : [More Information](Gradle build and release task - Azure Pipelines)
==============================================================================
SYSTEMVSSCONNECTION exists true
[command]C:\Windows\system32\cmd.exe /D /S /C "D:\a\1\s\gradlew.bat build"
'android' is not recognized as an internal or external command,
operable program or batch file.
Downloading https://services.gradle.org/distributions/gradle-5.1.1-all.zip
............................................................................................................................
Unzipping C:\java\gradle\user\wrapper\dists\gradle-5.1.1-all\97z1ksx6lirer3kbvdnh7jtjg\gradle-5.1.1-all.zip to C:\java\gradle\user\wrapper\dists\gradle-5.1.1-all\97z1ksx6lirer3kbvdnh7jtjg

Welcome to Gradle 5.1.1!

Here are the highlights of this release:
- Control which dependencies can be retrieved from which repositories
- Production-ready configuration avoidance APIs

For more details see Gradle 5.1.1 Release Notes

Starting a Gradle Daemon (subsequent builds will be faster)

> Configure project :app
File C:\Users\VssAdministrator\.android\repositories.cfg could not be loaded.
Checking the license for package Android SDK Build-Tools 28.0.3 in C:\java\androidsdk\android-sdk\licenses
Warning: License for package Android SDK Build-Tools 28.0.3 not accepted.
Checking the license for package Android SDK Platform 28 in C:\java\androidsdk\android-sdk\licenses
Warning: License for package Android SDK Platform 28 not accepted.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> Failed to install the following Android SDK packages as some licences have not been accepted.
build-tools;28.0.3 Android SDK Build-Tools 28.0.3
platforms;android-28 Android SDK Platform 28
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
Alternatively, to transfer the license agreements from one workstation to another, see Exporting licenses - Android Studio Project Site

Using Android SDK: C:\java\androidsdk\android-sdk

* 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 Gradle | Search for Help with Gradle

BUILD FAILED in 2m 38s
Error: D:\a\1\s\gradlew.bat failed with return code: 1
at ChildProcess.<anonymous> (D:\a\_tasks\Gradle_8d8eebd8-2b94-4c97-85af-839254cc6da4\2.149.1\node_modules\vsts-task-lib\toolrunner.js:639:25)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:886:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
No test result files matching D:\a\1\s\**\TEST-*.xml were found, so publishing JUnit test results is being skipped.
##[error]Error: D:\a\1\s\gradlew.bat failed with return code: 1
##[section]Finishing: gradlew build

Thanks for the help.


I'm NOOB developer

Continue reading...
 
Back
Top