when i start to emulate to my android phone and active developer mode and USB debugging ii got these messages and i tried some things but it didn't workenter image description here
2 Answers
Based on the images you posted and the error shown you have not accepted Android SDK Licenses (As per your image)
Run flutter doctor --android-licenses
in Terminal
You will be prompted to accept the licenses in the terminal.
Edit: It looks like as well, you do not have the CMD Line tools installed.
Please also run c:\Users\USERNAME\AppData\Local\Android\Sdk --install "cmdline-tools;latest"
Make sure to replace USERNAME with your name.
If you have trouble installing cmdline tools from Terminal refer to this post: cmdline-tools missing
After you have accepted the licenses and installed cmdline tools try running it again. Happy Coding

- 383
- 3
- 11
-
i got this message 'Android sdkmanager not found. Update to the latest Android SDK and ensure that the cmdline-tools are installed to resolve this.' – Mohamed Shehata Jul 11 '22 at 20:02
-
C:\Users\Mohamed>c:\Users\Mohamed\AppData\Local\Android\Sdk --install "cmdline-tools;latest" 'c:\Users\Mohamed\AppData\Local\Android\Sdk' is not recognized as an internal or external command, operable program or batch file. – Mohamed Shehata Jul 11 '22 at 20:04
-
I linked another post that has an in-depth explanation to install cmdtools if it won't work from the terminal. – Zodsmar Jul 11 '22 at 20:09
-
it didn't work bc not all of sdk tools appear here in my android studio – Mohamed Shehata Jul 11 '22 at 20:15
-
i posted pic in the post which show only 3 sdk tools – Mohamed Shehata Jul 11 '22 at 20:16
-
Try selecting Show Package Details and Unselect Show Obsolete Packages. How did you install Android Studio? – Zodsmar Jul 11 '22 at 20:22
-
it showed only one more tool . i downloaded it and installed it normally but i faced problem with sdk manger always although i uninstalled it and tried to install it again but nothing work , so i installed sdk by my own andselected the path in the android studio – Mohamed Shehata Jul 11 '22 at 20:26
-
You need to be more descriptive about what is going on with the SDK. When you installed either the SDK or Android Studio or both have you restarted your computer at all? – Zodsmar Jul 11 '22 at 20:29
-
idk what is the problem bc t work good when i debug using chrome or Edge. but this error appear always when i debug using phone – Mohamed Shehata Jul 11 '22 at 20:31
-
yeah restarted many times , – Mohamed Shehata Jul 11 '22 at 20:32
-
Using Chrome or Edge is a Web Browser and has nothing to do with building to a Phone. Phones are Android and therefore required the Android SDK to build. Can you try downloading the commandline tools manually and restarting your computer? (You can dowload it on the android studio website by scrolling down to the "Command line tools only" section) – Zodsmar Jul 11 '22 at 20:34
-
thanks for ur time , unfortunately still have the same problem . i will try to find solution for the android sdk , bc i think the problem is in the android sdk – Mohamed Shehata Jul 14 '22 at 15:06
Follow these steps for installing command line tools-
Open command like and enter - <path to android sdkmanager> --install "cmdline-tools;latest"
example,
~/Library/Android/sdk/tools/bin/sdkmanager --install "cmdline-tools;latest"
OR
Install Android SDK Command-line Tools in Android Studio:
Preferences → Appearance & Behavior → System Settings → Android SDK → SDK Tools → Android SDK Command-line Tools (latest)
Follow these steps for android licenses -
Run this on command line - flutter doctor --android-licenses
Follow these steps for installing Visual Studio -
Just click on the link to download the setup, while the installation process you'll also have to install Desktop development with C++
workload. Don't worry you'll just see an option while installation process right away.

- 1,448
- 1
- 14
- 30
-
it didn't work with me , when i use the command line it tell me "'C:\Users\Mohamed\AppData\Local\Android\Sdk' is not recognized as an internal or external command, operable program or batch file." – Mohamed Shehata Jul 14 '22 at 15:02
-
and in android sdk , there is no Android SDK Command-line Tools (latest) – Mohamed Shehata Jul 14 '22 at 15:03