DEV Community šŸ‘©ā€šŸ’»šŸ‘Øā€šŸ’»

Cover image for Fix license agreement issue on Flutter Doctor
Nathapon
Nathapon

Posted on

Fix license agreement issue on Flutter Doctor

If you run flutter doctor after the fresh flutter installed on your machine, you might encounter an error says license agreement not satisfied or even strange error says Exception in thread "main" java.lang.NoClassDefFoundError
Image description

Here is how i fixed it

  1. install Android SDK command line tools (latest)on your Android studio
    Image description

  2. run flutter doctor --android-licenses

It might not work right away after you run this command so you need to "Accept the license agreements" manually

press Y to review what agreement not satisfied
and simply press y and enter all the way through :)

Finally, check if that license error thing is gone by running flutter doctor again.

I hope this simple walkaway might be helpful to some of you guy struggling to setup flutter to work seamlessly, so enjoy and have a good day with Flutter :)

Top comments (0)

šŸŒš Browsing with dark mode makes you a better developer by a factor of exactly 40.

It's a scientific fact.