Flutter can’t connect to either emulator and smart phone

2023/01/03 0:14

Issue:

The Flutter program cannot connect to virtual devices, nor can it connect to mobile phones. The Flutter doctor command detects all fine, but the device is not detected.

Workaround:

I have also encountered this problem, you can check from the following two possible causes

First, make sure to add the following code to Path’s environment variable (presuppose you’ve already set ANDROID_HOME)

ANDROID_HOME\platform-tools;ANDROID_HOME\tools;

Second, it may be that there are many ADB installed on your computer, the global folder search ADB .exe, especially in the C:\Windows directory, delete the extra ADB .exe, make sure that only the ADB in the Android SDK, so try to connect again

Back to top