React Native with MEmu Emulator

The Android Virtual Devices that are installed through Android Studio are slower than a physical device.

MEmu is a high performance, fully compatible Android emulator that allows multiple instances.

It truly brings the Android experience to Microsoft Windows devices.

The following is a guide to setup a Reactive Native project with the MEmu emulator.

MEmu Requirements

  • Windows Vista/Windows 7 SP1/Windows 8.1/Windows 10
  • Intel or AMD CPU (with Virtualization Technology support preferred)
  • GPU with OpenGL 2.0+ support
  • At least 1 GB free system memory
  • At least 2 GB of free disk space under installation path

MEmu Setup

1. Download the MEmu App Player

2. Install MEmu accepting defaults.

3. Launch MEmu once the installation is complete.

4. Open a Command Prompt and run the following adb command to connect to MEmu.

> adb connect 127.0.0.1:21503

5. Verify the MEmu device is connected.

> adb devices
List of devices attached
127.0.0.1:21503 device

6. Navigate to the React Native project folder.

7. Start the React Native Server for Android.

> react-native run-android

8. Verify that MEmu displays a RedBox, which is used to display In-App error messages.

React Native RedBox Error Message

9. Click on the Settings button in the bottom-right of the MEmu screen to display the Developer menu.

MEmu Settings

10. Click on the Dev Settings item to display the Performance and Debugging options.

11. In the Debugging section click the Debug server host & port for device item to display a dialog.

MEmu Dev Settings

12. Enter the IP Address and Port number of the React Native Server in the format IP_ADDRESS:PORT and click OK.

Use ipconfig to locate the IP Address.

In this example the local machine IP Address and Port is 192.168.1.10:8081

This Device Debug Server Host & Port

13. Close the App.

14. Launch the App again and the React Native project will work and the RedBox will not be displayed.

React Native on MEmu

NOTE: To Reload the application when an update is made, click the Settings button in the bottom-right and click Reload.
The React Native Server will repackage and deploy the changes.

References

  • MEmu – A very fast Windows Android emulator.

Posted

in

by

Comments

2 responses to “React Native with MEmu Emulator”

  1. Damodar Avatar
    Damodar

    I want to debug and reload the react native app in memuplay emulator. Justlike in android emulator we need to press ctrl+M to get these options, is there any way to get these options in memuplay emulator?

  2. Zucci Daniel Avatar
    Zucci Daniel

    MEmu is cool, i get it, i’m new to react native, but then, the virtual device image doesn’t show like that of the android studio emulator, having the image display like tho its a real device is really cool, and creates awesomeness in the mind, if there is a way for me to get around it pls let me know. Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.