"You have not accepted the license agreements of the following SDK components:
[Android SDK Build-Tools 26.0.2]."
I ran this command on my PowerShell - "flutter doctor --android-licenses" but it didn't work.
I did this to fix it.I am on Windows so..
Run powershell with (Admin right) then type "android update sdk" into command line. then install the version you need to run, mind was 26.0.2. Select and install. Restart the powershell or your IDE.
That should do it.