React Native emulator troubleshooting
published 30. 3. 2020
mobile appquick tipdebugging
react nativeandroidterminal
How to cleanup android emulator data? What to do when emulator gets stuck while starting Remote JS debugging?
Data wipe out
When I needed to test fresh install use case of the app, I wanted the emulator to foget everything about the app.
The steps to get the emulator context cleaned up:
- stop emulator, if it is running
- in Android Studio, open AVD manager
- find the AVD to reset
- choose "Wipe Data" from the actions dropdown
Remote JS debugging stuck
While trying to get remote JS debugging working, the emulator got stuck. The only thing shown in the emulator was a message:
Loading from 10.0.2.2:8081
Couple of restarts and cache cleanups later, I searched and found the issue on SO, with an answer as well:
brew reinstall watchman
Restarting emulator and js app, things are good again.