A problem occurred configuring root project 'android'

[17:21:35] build dev started …
[17:21:35] clean started …
[17:21:35] clean finished in 5 ms
[17:21:35] copy started …
[17:21:35] deeplinks started …
[17:21:35] deeplinks finished in 24 ms
[17:21:35] transpile started …
[17:21:39] transpile finished in 3.83 s
[17:21:39] preprocess started …
[17:21:39] preprocess finished in 1 ms
[17:21:39] webpack started …
[17:21:39] copy finished in 4.37 s
[17:21:47] webpack finished in 7.98 s
[17:21:47] sass started …
[17:21:49] sass finished in 2.12 s
[17:21:49] postprocess started …
[17:21:49] postprocess finished in 19 ms
[17:21:49] lint started …
[17:21:49] build dev finished in 14.21 s

cordova run android
ANDROID_HOME=C:\Android\android-sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_141
[17:21:53] lint finished in 3.58 s
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details
:wrapper

BUILD SUCCESSFUL

Total time: 26.404 secs
Subproject Path: CordovaLib
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_4qqikash83zjijr0n7mvnzyhk.run(C:\wamp64\www\ionic\spetinfo\platforms\android\build.gradle:141)
Checking the license for package Android SDK Platform 26 in C:\Android\android-sdk\licenses
Warning: License for package Android SDK Platform 26 not accepted.

FAILURE: Build failed with an exception.

BUILD FAILED

Total time: 32.269 secs

  • What went wrong:
    A problem occurred configuring root project ‘android’.

You have not accepted the license agreements of the following SDK components:
[Android SDK Platform 26].
Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
Alternatively, to learn how to transfer the license agreements from one workstation to another, go to Exporting licenses - Android Studio Project Site

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    Error: cmd: Command failed with exit code 1 Error output:
    FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project ‘android’.

You have not accepted the license agreements of the following SDK components:
[Android SDK Platform 26].
Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
Alternatively, to learn how to transfer the license agreements from one workstation to another, go to Exporting licenses - Android Studio Project Site

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    [ERROR] An error occurred while running cordova run android (exit code 1).

Error message couldn’t be clearer:

1 Like

How to accept licence agreement ?

In SDK Manager, just install the package in the asked revision, it prompt a dialog to accept license