4

Well, a month ago I was learning a bit of Flutter, and it was all fine, no problems, so, last week I lost everything in my PC, and need to format it, I did. So yesterday I tried install Flutter but, when accepting Android Licenses, it gave me this error:

Warning: File /home/damiani/.android/repositories.cfg could not be loaded.

To solve this i just touch .android/repositories.cfg and this message doesnt appear anymore, but now, when I flutter doctor --android-licenses it gave me this:

[========= ] 25% Fetch remote repository...

From this, I can't do anything, it just get stucked in there... Sometimes even give this:

[============================= ] 75% Computing updates...

Or this:

[======================= ] 58% Computing updates...

The longer it gets is here:

1 of 6 SDK package license not accepted.] 100% Computing updates...             
Review license that has not been accepted (y/N)? y

1/

And from there, this message doesn't change...

When doing flutter doctor -v:

[✓] Flutter (Channel master, v1.14.7-pre.120, on Linux, locale pt_BR.UTF-8)
    • Flutter version 1.14.7-pre.120 at /home/damiani/flutter
    • Framework revision 82c00c915c (3 hours ago), 2020-02-05 06:35:49 -0800
    • Engine revision 81dffd1241
    • Dart version 2.8.0 (build 2.8.0-dev.7.0 c8ed304e97)

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at /home/damiani/Android/Sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.3
    • Java binary at: /var/lib/snapd/snap/android-studio/82/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses

[✓] Android Studio (version 3.5)
    • Android Studio at /var/lib/snapd/snap/android-studio/82/android-studio
    • Flutter plugin version 43.0.1
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] Connected device (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)

! Doctor found issues in 1 category.

No mood to continue with Flutter. Thanks since now...

sorry for bad english

os: arch linux

Jhonny
  • 41
  • 3
  • Does this answer your question? [Flutter run error : You have not accepted the license agreements](https://stackoverflow.com/questions/48604914/flutter-run-error-you-have-not-accepted-the-license-agreements) – Mahmoud Abu Alheja Feb 05 '20 at 18:37
  • I do no have the answer but ... I do have the same problem in Archlinux. I do not think it is an Arch problem though, because in my office I have another Arch box and it works fine. But, so far I have not been able to figure out the reason it does not work. – ralvez Feb 13 '20 at 01:01
  • Ralvez, I solved the problem parcially, I removed all Java JDK installed (except the one with Android Studio) and installed Java 7, later I just runned ./Android/Sdk/tools/bin/sdkmanager (I dont remember the exact path), accepted the licenses, and it worked, flutter doctor runs no issue. BUT, ever I run a flutter project I need to do flutter run on terminal, cause somehow acceleration doesn't work anymore, so, its not 100% solved, for a simple project, may be fine. I think thats a linux firmware problem, cause I tried with popOS and Mint (kernel 5.3), and had no problems... – Jhonny Feb 16 '20 at 00:46
  • In Android Studio, you should check to ensure that the Android SDK Command-line Tools are installed. Adding this fixed the issue for me in Flutter. https://stackoverflow.com/a/67791870/8094969 – bm888 Jun 01 '21 at 15:37

3 Answers3

1

switching to flutter dev channel fixed the problem for me. run flutter channel dev and then flutter upgrade and try flutter doctor --android-licenses

geme lemi
  • 11
  • 2
0

Try to run the following commands,(It should ask you to accept the licenses)

sdkmanager --licenses

And also make sure to run the following

flutter config --android-sdk /pathToAndroidSdk --android-studio-dir /pathToAndroidStudio

After the above two commands I hope your problem should be resolved.

Thanks :)

Mearaj
  • 1,828
  • 11
  • 14
0

This occurs because you haven't accepted all the android licenses.

Follow these steps, this worked for me.

  1. Open console/terminal
  2. Type flutter doctor --android-licenses
  3. Accept every license that comes up, press y and you are good to go.
Debu Shinobi
  • 2,057
  • 18
  • 21