将手机插到电脑上之后:
flutter run
然后显示以下内容:
More than one device connected; please specify a device with the '-d <deviceId>' flag,
or use '-d all' to act on all devices.
BLA AL00 • LKX7N17C23001931 • android-arm64 • Android 9 (API 28)
Android SDK built for x86 • emulator-5554 • android-x86 • Android 9 (API 28)
其中标注紫色部分的是真机:
然后重新:
flutter run -d LKX7N17C23001931
success!