Reputation: 161
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.
Upvotes: 16
Views: 48291
Reputation: 1997
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 AVD
using this tutorial.
Note down your AVD
name, if you are gonna run it without Android Studio
.
Run below code in a Command Prompt
window to start emulator without Android Studio
. Assuming that you have installed your SDK
in default location, otherwise change it to your location.
cd C:\Users\%USERNAME%\AppData\Local\Android\Sdk\emulator
emulator -avd Pixel_2_API_30
Pixel_2_API_30 is the name of AVD
so 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_profile
Reload your terminal from source.
source ~/.bash_profile
Now you can show all the emulators you’ve already created.
emulator -list-avds
You 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.
Upvotes: 24