1

Error running Gradle: Unable to download needed Android SDK components, as the following licenses have not been accepted: Android SDK Platform 27, Android SDK Build-Tools 26.0.2

To resolve this, please run the following command in a Terminal: flutter doctor --android-licenses.

On checking with Flutter doctor it gives the error:-

flutter doctor --android-licensesAndroid sdkmanager tool not found (/usr/lib/android-sdk/tools/bin/sdkmanager). Try re-installing or updating your Android SDK, visit https://flutter.io/setup/#android-setup for detailed instructions.

P.sharma
  • 79
  • 1
  • 6
  • Finally after a lot of efforts and research i got the solution to accept licenses in ubuntu/linux terminal [path to android -sdk]:-Sdk/tools/bin/sdkmanager --licenses this command prompt us to give the option to accept the licenses. – P.sharma Jun 11 '18 at 06:40

1 Answers1

0

Go to your sdk tools bin directory

sdkmanager --licenses

Also on Windows it does not work with JDK higher than 1.8

Automatically accept all SDK licences

Bartłomiej Sobieszek
  • 2,692
  • 2
  • 25
  • 40