You have not accepted the license agreements of the following SDK component


#1

Hi,

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

What am I doing wrong?


#2

Hi @womo

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. :slight_smile:

If you want to specify the SDK version you can do so by adding the following line to your config.xml

<preference name="android-targetSdkVersion" value="23"/>

#3

I had the same issue, to solve follow this SO answer.


#4

This may apply for local builds, but is not a solution for my issue
which occured with Ionic Cloud.

Den 18. nov. 2016 15:02, skrev Fiznool:

fiznool https://forum.ionicframework.com/users/fiznool
November 18

I had the same issue, to solve follow this SO answer
http://stackoverflow.com/a/40383457/1171775.


Visit Topic
https://forum.ionicframework.com/t/you-have-not-accepted-the-license-agreements-of-the-following-sdk-component/69570/3
or reply to this email to respond.

To unsubscribe from these emails, click here
https://forum.ionicframework.com/email/unsubscribe/945ccff2402e73fbc61fb33fc8af8257f4281edc7d08e0bf90049782f1e3c985.

womo-stellplatz.eu | Die Stellplatz-Suchmaschine

Lukas Koerdt
Berger Straße 175
60385 Frankfurt am Main
Germany

info@womo-stellplatz.eu
069 90 75 21 14 (Mo. – Fr. 10-17 Uhr)


#5

try this in your Terminal on Mac
android update sdk --no-ui --filter build-tools-24.0.0,android-24,extra-android-m2repository

Solved it for me


#6

This solved the problem to me, thanks @romanrast :slight_smile:


#7

thanks a lot @portapipe :slight_smile:


#8

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.


#9

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


#10

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 http://d.android.com/r/studio-ui/export-licenses.html

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

For more: http://stackoverflow.com/questions/40383323/cant-accept-license-agreement-android-sdk-platform-24/40383457#40383457


#11

Thank you @rafialikhan this work for me too:

android update sdk --no-ui --filter build-tools-25.0.0,android-25,extra-android-m2repository

#12

it’s worked for me, tks alot


#13

You can also just execute

$ANDROID_HOME/tools/bin/sdkmanager --licenses

#14

This is by far the best solution. Kudos!


#15

The easiest way at 2017 july


#16

The above answer didn’t work on windows, but this did:

“%ANDROID_HOME%\tools\bin\sdkmanager” --update

NB: This prompted to accept the SDK license straight away, and the build worked from there.


Android build broken after gradle dependencies update: Execution failed for task ':processDebugResources'. > com.android.ide.common.process.ProcessException: Failed to execute aapt
#17

this is the best solution :smile: thank you


#18
  1. open android studio
  2. open sdk manager
  3. update android api 25
    problem solved for me

#19

Did you find a solution yet? Same problem here. Can’t change anything locally. It’s the cloud building service https://dashboard.ionicjs.com/


#20

I’m getting unknown argument --licenses