ThinkAndCode
ThinkAndCode

Reputation: 1677

Unable to detect emulator when `react-native run-android` command is ran in Apple MacBook Pro with Apple M1 Chip

I have started doing react-native development in MacBook Pro M1. Since it is using Apple M1 Chip I have installed android emulator m1 preview. Emulator is running and opened project in studio. If I run react-native run-android command from terminal I am getting following error,

error Failed to launch emulator. Reason: No emulators found as an output of emulator -list-avds.

But if I run the app from studio by tapping on "Run app" then app runs successfully in emulator.

1.Is this how usually it works that react-native run-android command won't work in Apple MacBook Pro with Apple M1 Chip?

OR

2.Do I have do any configuration changes according to M1 Processor machine?

Upvotes: 1

Views: 1329

Answers (1)

William Amaral
William Amaral

Reputation: 111

I have the same problem on my M1 and found the solution by following these steps.

The official documentation recommends using npx react-native run-android.

Before installing android emulator m1 I installed adb separately.

brew install android-platform-tools

Then see the emulator after execute

 adb devices

I hope it helps.

Upvotes: 3

Related Questions