0

I have an Ionic project running in Mac and when I run the command ionic run android I get this

You have not accepted the license agreements of the following SDK components: [Android SDK Platform 24, Android SDK Build-Tools 25.0.1]. 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.

I had run the following commands but they hadn't solve the problem

  • android update sdk --no-ui --all --filter build-tools-23.0.1,android-23,extra-android-m2repository

  • android update sdk --no-ui --all --filter build-tools-24.0.1,android-24,extra-android-m2repository

  • android update sdk -a --filter platform-tools,build-tools-21.0.1,android-21,extra-android-m2repository --no-ui --force

I don´t know what platform-tools is missing, any ideas?

TurboAza
  • 75
  • 1
  • 9

2 Answers2

0

You need to generate android-sdk-license file and store it in %ANDROID_HOME%--->licenses folder. Just do this, https://stackoverflow.com/a/40383457/6554634 as per your Operating system.

Step1: Create android-sdk-license open it and copy this 8933bad161af4178b1185d1a37fbf41ea5269c55

Step2: Store it in %ANDROID_HOME%--->licenses folder

Community
  • 1
  • 1
Mr_Perfect
  • 8,254
  • 11
  • 35
  • 62
0

The license can be read and accepted over the terminal. Just execute

$ANDROID_HOME/tools/bin/sdkmanager --licenses

If you only create a File you haven't accept the license. So this is the better way.

Source: https://stackoverflow.com/a/45139795/6752349

Zonker
  • 31
  • 2