hardeepcoder
hardeepcoder

Reputation: 41

react-native run-android not working and how to run it on genymotion

I just start learning react-native. when I trying to run the react-native run-android command it is showing error about android emulator.

Please help me to run my first react native app on Genymotion.

Errors

Upvotes: 3

Views: 18686

Answers (4)

Sukh
Sukh

Reputation: 31

in gradle-wrapper.properties change distributionUrl=https://services.gradle.org/distributions/gradle-6.3-all.zip

from 5.x

Upvotes: 1

Abolfazl Miadian
Abolfazl Miadian

Reputation: 3159

simple way: first connect and android device or run an android emulator then do this steps

1- open android studio

2- click on File->open->navigate to to your react-native project and choose android folder

3- comeback to cmd and run react-antive order again

4- react-native run-android

Upvotes: 2

Mayur Baldha
Mayur Baldha

Reputation: 126

Steps to setup for React Native with GenyMotion on MAC Machine

  1. Installed Android Studio
  2. Installed Genymotion
  3. Pointed Genymotion settings custom SDK to: /Users/myusername/Library/Android/sdk
  4. Added path to adb tool directory in .bash_profile to: PATH="/Users/myusername/Library/Android/sdk/platform-tools:${PATH}"
  5. Restarted terminal for path to take effect
  6. Ran exp path in terminal to copy path to exp
  7. Ran adb in terminal to make sure it could find adb in platform-tools directory
  8. Restarted Genymotion
  9. Created and started virtual device in Genymotion
  10. Started Expo XDE and started project
  11. Ran Open on Android from XDE
  12. App started on virtual device created in Genymotion (step 9)

after these steps, on Terminal fire : npm run android

This has worked for me !

Upvotes: 0

Dragon
Dragon

Reputation: 1

First of all you have to installed genymotion plugin on android studio. After that please run genymotion emulator.

And please open android studio and android project of created RN app. The relevant gradle version will be downloaded and synchronized.

And then run command "react-native run-android".

Upvotes: 0

Related Questions