'Why React-Native Couldn't start project on Android connection with Expo?
Couldn't start project on Android.
Error : No Android connected device found, and no emulators could be started automatically.
Please connect a device or create an emulator (https://docs.expo.io/workflow/android-studio-emulator).
Then follow the instructions here to enable USB debugging:
https://developer.android.com/studio/run/device.html#developer-device-options. If you are using Genymotion go to Settings -> ADB, select "Use custom Android SDK tools", and point it at your Android SDK directory.
Solution 1:[1]
In order to run your React Native application, you first need to run an emulator seperately. It won't start an emulator automatically like a native Android Studio build.
Create an
AVDusing this tutorial.Note down your
AVDname, if you are gonna run it withoutAndroid Studio.Run below code in a
Command Promptwindow to start emulator withoutAndroid Studio. Assuming that you have installed yourSDKin default location, otherwise change it to your location.cd C:\Users\%USERNAME%\AppData\Local\Android\Sdk\emulator emulator -avd Pixel_2_API_30Pixel_2_API_30 is the name of
AVDso change it to yours.
For Mac (Followed this article)
Assuming your Android SDK was installed to the default location…
Export the emulator to your PATH.
echo 'export PATH=$PATH:~/Library/Android/sdk/emulator/' >> ~/.bash_profileReload your terminal from source.
source ~/.bash_profileNow you can show all the emulators you’ve already created.
emulator -list-avdsYou can run any of them by typing emulator and then @. So if one of your devices is called 'MyPixelDevice', you’ll run it like so
emulator @MyPixelDevice
Once your emulator is running then you can run your React Native build as stated in this setup guide.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
