skip to Main Content

I created initial project (followed all the steps) by

npx react-native init AwesomeProject

when I run android emulator by:

npx react-native start
npx react-native run-android

I’m getting this error

> Task :app:installDebug FAILED

As I can see, there’s no metro connection

When I wipe data or reinstall the emulator, it works fine for the first time, but when I load the app for the second time, I get this error again

Any ideas how to fix? Many thanks!

2

Answers


  1. Chosen as BEST ANSWER

    I tested that version of Android Studio on two more Macbook devices, and all of them had the same issue. Only the new release of Android Studio worked


  2. On the second time,

    just run npx react-native start, and open the installed app from the emulator. If you see an error connecting to the metro, shake the emulator Ctrl+M, it will open the debug menu, change the IP and port to your IP address, and port as 8081.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search