I’m trying to build my app with Ionic Cloud. Building it locally with cordova CLI works, but the Ionic Cloud build is always failing. This is the build 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 24].
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: 0.867 secs
Failed to install 'cordova-plugin-device':Error: /home/package/workspace/apps-d0890ab6-26/cordova/platforms/android/gradlew: Command failed with exit code 1
at ChildProcess.whenDone (/home/package/workspace/apps-d0890ab6-26/cordova/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:829:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
Error: /home/package/workspace/apps-xxxxxxxx-26/cordova/platforms/android/gradlew: Command failed with exit code 1
This sounds like an issue in ionic cloud. Did you try to set your targetSdkVersion to 23? Of course, this is only an option if you do not utilize features from v24.
If you want to specify the SDK version you can do so by adding the following line to your config.xml
Hi everyone,so after racking my brain,I found that the first place to check is your environment variables to check the Android Home path. From there on,follow it and update SDK’s needed in your SDK manager. What my issue was: I had a previous version of android studio I deleted,so my path for the new one was different and I also had embarcadero as well in another path,so I was updating in one SDK manager but Ionic 2 was using the other one where I had not updated and accepted the licenses. If you have the same issues,just copy the new files in both paths so they are mirrored. Just my 2 cents. Hope this helps someone else.
first run platform rm android then again add android platform like platform add android this solution work for case you just try this may this will help you
Error: /Users/XXXX/Projects/XXXX/fe/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 25].
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
This worked for me for the SDK License Issue
android update sdk --no-ui --filter build-tools-25.0.0,android-25,extra-android-m2repository