How to Solve "You have not accepted the license agreements"?

How to Solve “You have not accepted the license agreements”?

Let’s say users run a flutter mobile application. Sometimes it may happen that the compiler will give an error that states “You have not accepted the license agreements”. So, in this article, we will get into How to Solve “You have not accepted the license agreements”.

How to Solve “You have not accepted the license agreements”?

So, in order to solve this error user can try the below code. You can follow the below steps to implement the code.

  1. Open your terminal
  2. type flutter doctor –android-licenses
  3. press y to accept every license.

Also, the only command that worked & solved our problem was:

(your android_sdk folder path)\tools\bin\sdkmanager --licenses

You can also execute the steps below:

  • So, execute the command prompt as administrator.
  • Now you have to run the command flutter doctor –android-licenses and have to accept all licenses.
  • Now check if the issue is solved or not. For that, you can run the command flutter doctor -v that will check if the issue is solved or not.
  • Now make sure to check that everything is ok or not. So, now you can execute the command prompt as a regular user (your user) and execute flutter doctor -v again.
Android Licenses
Android Licenses

If you are using windows then open the command prompt as admin. Now run the following command in the command prompt of the window.

flutter doctor --android-licenses

After that enter y for all (y/n) to accept the agreement. Here (y/n) is for yes or no.

There is one more problem that is for new installations (especially on macOS) flutter doctor –android-licenses does not work. So, now you have to run the following command (notice the new path to SDK cmd-line tools). So, now you will be able to accept the licenses if you run the below command:

~/Library/Android/sdk/cmdline-tools/latest/bin/sdkmanager --licenses

Please make sure that you have done with environment variable setup before running the given command on windows/mac/i/Linux/Unix for

  • Android SDK
  • SDK manager
  • Java
  • Flutter

Note:- Now update the variable path with your sys path

flutter bin path
flutter bin path
  • Run the command prompt as an administrator.  Run the command doctor –android-licenses at the end.
  • Press y to accept the license. ;
  • Execute Flutter Doctor v to confirm that the problem has been resolved.

It somehow interfered with flutter! Double-check your java path entry. Go to the Java environment variable and check the path entry. Store one of them in the bin and remove the other.

C:\Program Files\Java\jdk-11.0.8\bin
C:\Program Files\Java\jdk-11.0.8

Now you just have to run the flutter doctor –android-licenses accept everything (click the y key, and then the enter key). You can also try the code we have mentioned below.

Rename C:\Users\%username%\AppData\Local\Android\Sdk\tools folder to tool
  • So, navigate to cd C:\Users\%username%\AppData\Local\Android\Sdk\tool\bin in cmd
  • After that run SDK manager –update –verbose, will create a new folder tools
  • Run flutter doctor –android-licenses
  • Then click y to accept the Android license and see if the issue is resolved.

Conclusion:

Thanks for Reading! So, in this article, we have been through how to Solve “You have not accepted the license agreements” In Flutter. Do let us know your feedback/comments on the same. Flutter Agency is the best Flutter App development company dedicated to Flutter Technology and Flutter Developers. The portal is full of cool resources from Flutter like Flutter Widget Guide, Flutter Projects, Code libs and etc. So, contact us for your next project.

Abhishek Dhanani

Written by Abhishek Dhanani

Abhishek Dhanani, a skilled software developer with 3+ years of experience, masters Dart, JavaScript, TypeScript, and frameworks like Flutter and NodeJS. Proficient in MySQL, Firebase, and cloud platforms AWS and GCP, he delivers innovative digital solutions.

Leave a comment

Your email address will not be published. Required fields are marked *


Discuss Your Project

Connect with Flutter Agency's proficient skilled team for your app development projects across different technologies. We'd love to hear from you! Fill out the form below to discuss your project.

Have Project For Us

Get in Touch

"*" indicates required fields

ready to get started?

Fill out the form below and we will be in touch soon!

"*" indicates required fields