I am new to React-Native and android app development as a whole. While i try to run remote debugger in Android Emulator (Pixel 2 phone), I get the following error in the emulator:
Then after, even if I stop remote debugging, the application won't run on the emulator (i.e. nothing is rendered into the emulator screen). I need to run the project again.
Following is the auto-generated debugger URL: http://10.0.2.2:8081/debugger-ui
How can I Fix this problem?
Connecting a React Native app to React Native Debugger To connect your app with React Native Debugger, you need to run your app and start debug mode. To start debug mode, shake your mobile device or press Command + Shift + Z or Ctrl + M and choose the debug option. We're all set to begin using React Native Debugger.
For Android: Ctrl + M (emulator) or Shake the phone (In Device) to reveal menu. Make sure you have chrome. On the revealed menu select Debug JS Remotely Option. Chrome will be opened automatically at localhost:8081/debugger-ui.
In App Developer Menu You can open the developer menu on the IOS simulator by pressing command + D. On Android emulator, you need to press command + M. Debug JS Remotely − Used for activating debugging inside browser developer console.
http://10.0.2.2:8081/debugger-ui This is internal IP the Android VM, with your browser use localhost:8081/debugger-ui
reference https://github.com/facebook/react-native/issues/16674#issuecomment-376774645
uninstall your application, then run => react-native run-android
in terminal then click debugging end in chrome replace http://localhost:8081/debugger-ui/
, end run react-native run-android. if you still haven't succeeded try again
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With