I am unable to accept Android SDK licenses when installing Android SDK for flutter through command line

964

1) Open your terminal

2) Type flutter doctor --android-licenses

3) If you don't see y/n option , continue hitting enter key to read through the license

4) When you get option to press Y/N , press Y to accept every license.

Share:
964
Vedant Singh
Author by

Vedant Singh

Updated on December 20, 2022

Comments

  • Vedant Singh
    Vedant Singh over 1 year

    I tried everything mention on different questions on github and stackoverflow but failed. I also tried uninstalling and re-installing sdk 2 times.

    When i run sdkmanager --licenses it shows unknown command : --licenses

    When I run flutter doctor -v ,it shows one issue found SDK licenses not accepted

    What I Have:

    JDK 8 Platform-tools 30.0.1 Build-tools 28.0.3 SDK Tool 25.2.5[Obsolete](I could not prevent it from downloading as it is required for the Andorid emulator) SDK Platform API 28 Emulator: Android 9(API 28) Intel x86 Atom System Image

  • Vedant Singh
    Vedant Singh almost 4 years
    It doesn't work. Terminal shows can recognise command and shows bunch of possible command which doesn't include --licenses. Please check is there any problem in version of my sdk tools as mentioned in the question.
  • Vedant Singh
    Vedant Singh almost 4 years
    Terminal doesn't give me chance to press enter as it halts the process saying Unknown Command --licenses. Please help I am not able to run android app. Please check if there is any problem with my versions of sdk tools as mentioned above in question.
  • griffins
    griffins almost 4 years
    is flutter exported to path?
  • Vedant Singh
    Vedant Singh almost 4 years
    I resolved this isssue by unistalling my emulator and SDK Tool 25.2.5 and accepted all licenses but now I have another problem which is "Android SDK file not found: adb". This pops up when i run flutter doctor -v
  • Vedant Singh
    Vedant Singh almost 4 years
    I resolved this isssue by unistalling my emulator and SDK Tool 25.2.5 and accepted all licenses but now I have another problem which is "Android SDK file not found: adb". This pops up when i run flutter doctor -v
  • griffins
    griffins almost 4 years
    quite weird, do you by any chance have two sdks cause if you uninstall the sdk you shouldnt be able to accept licences
  • Ashok Kumar
    Ashok Kumar almost 4 years
    crosscheck if you have adb file present inside ˜/Android/sdk/platform-tools folder ? if not try installing adb tools or reinstall android studio. after that you should be able to run the adb command from terminal. e.g try running 'adb devices' to check the connected android devices/emulators
  • Vedant Singh
    Vedant Singh almost 4 years
    It worked for me thanks. I found that adb.exe was missing so reinstalled sdk and fixed it
  • Ashok Kumar
    Ashok Kumar almost 4 years
    Glad you found the solution :)