0
votes

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.

1
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

1 Answers

0
votes

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