You have not accepted the license agreement of the following SDK components:

1

I'm trying to get an android emulation through ionic. For this I go to the folder of my project and write ionic cordova emulate android . I find that he gives me a "FAILURE" and two "BUILD FAILED". The FAILURE message is as follows:

  

FAILURE: Build failed with an exception.

     
  • What went wrong: A problem occurred configuring project ': CordovaLib'.

         
        

    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      link

      
  •   
  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

  •   
  • Get more help at link

  •   

I search a bit for google and then I get to a stackoverflow site question in English with several answers , I focus on the most voted:

  

The way to accept the license agreement from the line has changed.   You can use the SDK manager which is located at:

     

~/Library/Android/sdk/tools/bin Run the sdkmanager as follows:

     

./sdkmanager --licenses And accept the licenses you did not accept yet   but do need.

     

See for more details of the Android Studio documentation, although the   current documentation is missing any description on the --licenses   option.

I open the windows cmd:
I enter cd C:\android-sdk-windows\tools\bin and then I write: sdkmanager --licenses and I get the following:

How can I accept the license for the "Android SDK Platform 26" component?

    
asked by Mr. Baldan 12.04.2018 в 15:44
source

1 answer

3

Generally running the updater from the gui or command line shows you the licenses and gives the option to accept them

./sdkmanager --update

For each package that does not find the accepted license it shows you the text of the license by screen, date of the same and asks Accept? (y/N) to be N the default option is easy to skip any with a double enter.

To accept several licenses at once (linux / mac):

$ yes | ./sdkmanager --update

accepted licenses are saved in $ANDROID_HOME/licenses if you change the root of sdk or is not defined the variable shows you the error, you can also tell the manager where to look for them with the option --sdk_root=$ANDROID_HOME . In windows this variable you invoke it like this: %ANDROID_HOME% .

    
answered by 14.04.2018 / 18:10
source