3
votes

While integrating Flutter in Android studio getting error as * Error running Gradle: Unable to download needed Android SDK components, as the following licenses have not been accepted: Android SDK Build-Tools 26.0.2, Android SDK Platform 27 To resolve this, please run the following command in a Terminal: flutter doctor --android-licenses

1
What's the result of flutter doctor --android-licenses? I have seen this issue mentioned a few times recently, but don't know if something was suggested how to fix it.Günter Zöchbauer
sdkmanager --version failed: 1 this is the resultLAL
In menu "Tools > Android > SDK Manager > SDK tools" are there any "Update available" items?Günter Zöchbauer
yes, Android SDK platform tools from 27.0.0 to 27.0.1LAL
I this on Windows? Are you using a non-standard shell?Günter Zöchbauer

1 Answers

7
votes

enter image description here Problem was with sdk path in local.properties. By default its pointing to different location. It works for me when change android sdk home dir in sdk.dir