Can't connect android phones / emulator on android studio in mac m1 for flutter
Asked Answered
S

2

1
  • List item

I can't connect my android phones with USB not even any installed emulator in the latest Android Studio Bumblebee m1 chip version on my mac m1 chip laptop, only when I open a flutter project. The emulator works fine when I run a native android project.

Checkout the screenshot.

When I click on the no device selected, I don't find the Pixel 4 API 31` emulator. I need this emulator to run my app. I think it might be a bumblebee version issue.

When I click on no device selected

Selestina answered 1/4, 2022 at 6:26 Comment(3)
Select a device from that red circle area where it says no device selectedRune
Also make sure that you restart the usb debugging mode once if doesn't work after selecting the device.Homosexual
There is only iOS Simulator and Chrome when I select the red circle. This Android emulator in the image is not found there.Selestina
A
1

try to run this command

  • sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer

if still not getting the device then run 'flutter upgrade'

also, check for the developer option on your laptop and debugging option on mobile

Arne answered 1/4, 2022 at 12:7 Comment(0)
M
1

I had this problem on Android Studio hedgehog 2023.1.1 using MacOS sonoma 14.1.2 and flutter version 3.16.2. Im using the very latest flutter version. I upgraded all these software versions yesterday, so im not sure which upgrade caused the issue.

I had to get my device back inside the AS device selection dropdown by doing the following:

Kill adb server (while android studio is open):

  1. Go to android studio > settings > languages and frameworks > android sdk, then copy the sdk location (dir on your device).
  2. In terminal, navigate to that directory, and then cd platform-tools
  3. run adb kill-server - if this doesnt work run chmod +x adb to make the adb codefile executable.
  4. optionally add the adb command to your OS PATH for your terminal to allow you to run adb commands from anywhere in terminal in future.

On your device (I was connected via USB-C while I did this):

  1. Go to developer options in device settings.
  2. turn off USB debugging
  3. tap revoke usb debugging authorisations
  4. turn on USB debugging
  5. MacOS sonoma had a popup at this stage about trusting the connected device - accept this.

Finally, from terminal, run adb start-server then in android studio, refresh the device list - device should now appear.

Mushro answered 2/12, 2023 at 12:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.