I have downloaded the latest android studio for windows. But when I am trying to run
ionic corodova build android
it’s failing with below error.
Running app-scripts build: --platform android --target cordova
[16:08:10] build dev started …
[16:08:10] clean started …
[16:08:10] clean finished in 16 ms
[16:08:10] copy started …
[16:08:10] transpile started …
[16:08:20] transpile finished in 9.28 s
[16:08:20] webpack started …
[16:08:20] copy finished in 9.60 s
[16:08:31] webpack finished in 11.69 s
[16:08:31] sass started …
[16:08:34] sass finished in 2.39 s
[16:08:34] build dev finished in 24.16 s
cordova build android
ANDROID_HOME=C:\Users\tanmay\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_131
Subproject Path: CordovaLib
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_7o7xe2pxt883tg6ritz4aewbd.run(D:\mutrade\web\web\utrade\static\utrade\HybridApp\ionic\platforms\android\build.gradle:141)
Checking the license for package Android SDK Platform 26 in C:\Users\tanmay\AppData\Local\Android\sdk\licenses
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.
Warning: License for package Android SDK Platform 26 not accepted.
BUILD FAILED
Total time: 3.447 secs
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 build android (exit code 1).
As in some answers here I changed the config.xml to include
but it had no affect.
Can anybody pls help me with the error.