How to accept SDK license agreement to run Ionic app on Android device?

I am trying to run an ionic app on my android device by running ionic cordova run android, but I’m getting this error message:

cmd: 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

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

Here are my system variables:

And here is my Path variable:


I saw one solution someone suggested online was to execute this command:

%ANDROID_HOME%/tools/bin/sdkmanager --licenses

However, as you can see below, there is no tools folder where my SDK is located:

Can someone please tell me what I’m doing wrong, & how I can resolve this issue?