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.