,

Resolved! Failed to install the following Android SDK packages as some licences have not been accepted.

During deployment or debugging process you may face problem in Ionic CLI similar to this onError … … FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring project ‘:app’. > Failed to install the following Android SDK packages as some licences have not been accepted. platforms;android-28 Android SDK Platform 28…

By.

•

min read

During deployment or debugging process you may face problem in Ionic CLI similar to this onError



FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ‘:app’.
> Failed to install the following Android SDK packages as some licences have not been accepted.
platforms;android-28 Android SDK Platform 28
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
Alternatively, to transfer the license agreements from one workstation to another, see [url]

This type of error comes as we have not installed or accepted the updated API version on Android studio’s SDK manager. So to continue building APK files or debug ionic applications we need to install the API version given in error. As you can see in CLI error the version of the platform is 28.

Let’s get to know how to resolve this issue using two methods by CLI and Android studio’s SDK Manager.

CLI Method

Open CMD, then change to the directory where Android Studio is installed. After that run following CMD command.

C:\Users\<YOUR_USERNAME>\AppData\Local\Android\Sdk\tools\bin\sdkmanager "platforms;android-28"

 

replace <YOUR_USERNAME>  with your username.

Then hit enter, then you will be asked to accept term & conditions with Y input.

That’s it.

Android Studio Method

Open Android Studio then go to tools then click on SDK  Manager 

Now check the platform number on popup window same shown in error then click on apply to install.

That’s it now you can proceed normally with app deployment on ionic CLI.

Leave a Reply

Your email address will not be published. Required fields are marked *