I’m updating a 6 months old project, and getting this error when I use: ionic package build android
λ ionic package info 90
√ Retrieving information about build 90 - done!
id | 90
status | FAILED
platform | Android
mode | debug
profile |
started | 2017-11-22T20:15:07.182Z
finished |
output:
Discovered plugin “com.phonegap.plugins.barcodescanner” in config.xml. Adding it to the project
Found phonegap-plugin-barcodescanner is already fetched. Skipped fetching com.phonegap.plugins.barcodescanner
Plugin “phonegap-plugin-barcodescanner” already installed on android.
ANDROID_HOME=/opt/android-sdk
JAVA_HOME=/usr/lib/jvm/java-8-oracle
:wrapper
BUILD SUCCESSFUL
Total time: 0.77 secs
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_cms663b5k7ukq3tikhtmdf93g.run(/home/package/workspace/apps-a35e0e54-90/cordova/platforms/android/build.gradle:143)
Checking the license for package Android SDK Platform 26 in /opt/android-sdk/licenses
Warning: License for package Android SDK Platform 26 not accepted.
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 http://d.android.com/r/studio-ui/export-licenses.html
- 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: 2.138 secs
Error: /home/package/workspace/apps-a35e0e54-90/cordova/platforms/android/gradlew: 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 http://d.android.com/r/studio-ui/export-licenses.html
- Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
I’ve updated Android Studio, Android SDK, npm, ionic, cordova…
and now this error about licenses… (tried other solutions given on the forum but didn’t work)
any help appreciated!