When running flutter doctor
in the cmd it is indicated that android licenses need to be accepted by running the command flutter doctor --android-licenses
.
Running the command got me an error that a repositories.cfg
could not be found at a specific directory.
I did create the empty file in the directory and waited 4~5 minutes as suggested in this SO post repositories.cfg could not be loaded.
Running the command again results in a new error:
Warning: An error occurred during installation: Failed to move away or delete existing target file:
C:\installs\sdk\tools
Move it away manually and try again..
Deleting the tools folder did not solve the issue.
What do I have to do to be prompted to accept the Android licenses?
A way to resolve the issue is to copy the
tools
folder to another place (e. g.C:\temp
). Then navigate the cmd to the directory withcd C:\temp\tools\bin
YOUR_DIRECTORY_HERE
should be replaced with the path to your original SDK folder (C:\installs\sdk
). Once that is done, delete theC:\temp\tools
copied folder.This answer was influenced by Can't update \tools - Android SDK Command Line Tools for Windows