0

I am trying to run sample flutter app. I downloaded flutter SDK. Since I am an Android developer I had android SDK. I am using Ubuntu 16.04 LTS. Using Android Studio 3.0.1 created a new Flutter Application (Flutter plugin was installed). Now when I try to run the APP, It is giving following error -

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

And it suggested

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

I followed the instruction. Still, I am getting the same error message.

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

I have tried - ./sdkmanager --licenses But no success.

enter image description here

eli-k
  • 10,898
  • 11
  • 40
  • 44
Nagesh Jatagond
  • 344
  • 2
  • 13
  • follow this [How to accept android sdk license](https://stackoverflow.com/questions/39760172/you-have-not-accepted-the-license-agreements-of-the-following-sdk-components) – Mohammed Farhan Mar 13 '18 at 04:40

1 Answers1

2

Problem was with sdk path in local.properties. By default its pointing to different location. Once I changed sdk.dir to my Android SDK path, it worked fine. I am able to run the app now.

Nagesh Jatagond
  • 344
  • 2
  • 13