At work I’m starting to package an Ionic App for Android and it’s been one problem after another (I spent most of yesterday afternoon dealing with a version incompatibility with my NPM libraries and installing Android Studio). Today I ran into a problem getting the application to compile. I’m documenting the solution here because I’m sure I’ll have a problem with it again.

This is the error I received:

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

After some Googling I was able to determine I needed to run:

~/Library/Android/sdk/tools/bin/sdkmanager --licenses

After this you’ll need to press Y until you receive:

All SDK package licenses accepted

Like this post? Don't forget to follow us on Twitter and Facebook for updates.