iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
🐥

Notes on running Flutter on a physical Android 10 device from macOS Catalina

に公開

This is a topic that has already been covered everywhere, but I'm making a note of it since I got a bit stuck.

1. Enable Android Developer Mode

Go to the "Settings" app -> Device information (near the bottom) -> Tap "Build number" (at the very bottom) 7 times.
As mentioned in the reference, it feels like an old-school cheat code.

2. Enable Android USB Debugging

Go to the "Settings" app -> System -> Open "Advanced" -> Open "Developer options"
-> Turn on "USB debugging"

When asked "Allow USB debugging?", tap OK.

3. Connect to Mac

Connect with a USB cable.
It's convenient that Mac and Android can now be connected via USB-C to USB-C.

??? "Only iPhone is left behind!? (intense voice)"

4. Allow USB File Transfer from Android Notification Center

Open the notification center, tap "Charging via USB"
-> From advanced settings, select "Use USB for: File Transfer"

5. Check with flutter devices

Run flutter devices and if the connected device is displayed, the preparation is complete

6. Run flutter run

Execute flutter run


Some articles suggest that Android File Transfer is necessary, but it is not required.

  • Causes and solutions when Android cannot be recognized by PC! Set the purpose of the USB connection to display smartphones and tablets from your computer | At-Hack

Discussion