Aman Gupta -  ΔMΔN
Aman Gupta - ΔMΔN

Reputation: 3007

My First react-native program is not running on emulator

I am a beginner in react-native. And create a project named AwesomeProject by this cmd

react-native init AwesomeProject

And try to run it by this cmd

react-native run-android

But i m getting an error while runing,

Could not run adb reverse: Command failed: adb -s emulator-5554 reverse tcp:8081 tcp:8081

Also attaching a screen-shot of terminal, enter image description here

And something is shown on the emulator which is attached below.

enter image description here

Please suggest me how can i do to fix this issue.

Upvotes: 0

Views: 551

Answers (2)

pritam
pritam

Reputation: 2558

If you are using adb from 'android-tools-adb', you might get this error because it does not have support for 'reverse' which is required for reversing socket communications back to device. If that is the case, go on reading further.

Try using the adb provided by Android Studio which has the support for 'reverse'. Android studio has adb present in platform-tools inside your Android Sdk path. (Generally /home/your-user-name/Android/Sdk on ubuntu machines.)

You can use one of below commands to use the correct adb executable based on your preference,

sudo ln -s /home/<user>/Android/Sdk/platform-tools/adb /usr/local/bin

sudo ln -s /home/<user>/Android/Sdk/platform-tools/adb /usr/bin

Try running the emulator again.

Upvotes: 1

Vinay
Vinay

Reputation: 361

Not sure if you have installed your packages(i.e. npm install). Can I see your file structure.

Upvotes: 0

Related Questions