2

I am, working on Ionic3 project. When build app using cordova build android Its shows this error

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 Build-Tools 26.0.1, Android SDK Platform 25].
  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

I have followed stackoverflow answers related this types of errors. But still its shows this error

I have followed following procedure to overcome error.

  1. Successfully added ANDROID_HOME directory
  2. Accepted all licenses using following command

    ./sdkmanager --licenses

At ( $ANDROID_HOME/Android/Sdk/tools/bin ) directory

What is the main issue for occurring this error ? How to overcome this issue ? Is the any other way to solve this issue ?

  • https://stackoverflow.com/questions/38096225/automatically-accept-all-sdk-licences – Suraj Rao Aug 21 '17 at 07:09
  • @Niroshan8889 open your android sdk manager and install Android SDK Build-Tools 26.0.1 and Android SDK Platform 25. While installation you have to accept license manually and that should do – Gandhi Aug 21 '17 at 07:55
  • I have successfully installed sdk tools but erroor still there – Niroshan8889 Aug 21 '17 at 19:02
  • [This answer](https://stackoverflow.com/questions/40383323/cant-accept-license-agreement-android-sdk-platform-24) solves that problem. – Dmitriy Bobrovskiy Jan 19 '20 at 16:59

1 Answers1

1

An Easier Way would be to Run this on your command prompt:

mkdir "%ANDROID_HOME%\licenses"

echo|set/p="8933bad161af4178b1185d1a37fbf41ea5269c55""%ANDROID_HOME%\licenses\android-sdk-license"

Then locate it from the folder you set as your Android Home Or: You could Easily:

mkdir "folder containing Android-sdk\licenses"

echo |set /p="8933bad161af4178b1185d1a37fbf41ea5269c55" "folder containing Android-sdk\licenses\android-sdk-license"

Remember To Use Either echo or set.

And Your Good To Go

More From This Previous Answer

Community
  • 1
  • 1
Chinedu Etoh
  • 153
  • 3
  • 11