123

How can I enable live reload in the android emulator?

The documentation for android wasn't very helpful for a android noob.

4
  • How can this be done when using a device @Kenneth Lynne? Commented Jul 27, 2017 at 12:48
  • 4
    Shake the device (make sure you built the development build) Commented Aug 14, 2017 at 14:36
  • 1
    Thanks. I've been using adb shell input keyevent KEYCODE_MENU for a while now. Works fine for me Commented Aug 15, 2017 at 15:36
  • Select emulator and Cmd+M Commented Aug 14, 2018 at 13:51

9 Answers 9

269
  • Type the following in your command prompt to install and launch your app on the device or emulator:

    $ react-native run-android

  • Then click on emulator and press CTRL + M (CMD + M on MacOS) or shake the Android device which has the running app.

  • Then select the Enable Live Reload option from the popup.

    enter image description here

Sign up to request clarification or add additional context in comments.

6 Comments

doesn't work on mac with cmd + m, i have to run adb shell input keyevent 82
I hope it helps. You should click on window bar to use Ctrl+M / Cmd+M
ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu', android: 'Double tap R on your keyboard to reload,\n' + 'Shake or press menu button for dev menu',
Note that if you are going to use keyboard shortcuts in android emulator then you have to set this option: Settings->Send keyboard shortcuts to : 'Virtual device' as I do that and it worked for me.
Confirm it works on Mac os 10.13.6, Android Studio Sep 2018.
|
51

Executing the command, the configuration menu will appear adb shell input keyevent 82

Documentation

1 Comment

19

I was BLIND. It clearly states:

On Android shake the device or press hardware menu button (available on older devices and in most of the emulators, e.g. in genymotion you can press ⌘ + m or F2 to simulate hardware menu button click). You can also install Frappé, a tool for OS X, which allows you to emulate shaking of devices remotely. You can use ⌘ + Shift + R as a shortcut to trigger a shake from Frappé.

2 Comments

For physical Android device, I found that by long pressing the device menu button, the reload menu appears.
Also, for physical devices, you may shake the phone which pops up the menu
7
  • Using shortcuts: CTRL + M, or CMD + M (macOS)
  • From terminal: adbshell input keyevent 82

Important Note: Using Expo, make sure you are in development mode. The shortcuts will not work in production mode for Android emulator.

I did enable that through Expo XDE by tapping the cog next to the url and checking development mode. You may need to rebuild.

Expo - Development Mode


enter image description here

Comments

6

I am using Redmi note 3 for debugging purpose and was facing similar issue. The solution was that MIUI by default disables popup permission for apps, which is needed in this case to get the reload screen. After enabling the popup permission for my app it works perfect. Hope it helps someone.

2 Comments

can you tell me how to enable it
sorry for late reply. I guess by now you might have figured out how to do it. If not then you can find it in the permission section in your settings.
6

For enabling Hot reloading or Live reloading on Device (external Android phone):

First, run the app using react-native run-android on Terminal.

Now, shake the Android device which has the running app.

Then select the Enable Hot Reloading or Enable Live Reload option from the popup.

Comments

4

To enable live reload in React Native using Android you need to do the following steps:

  • Open you emulator;
  • Execute your application (react-native run-android);
  • Make sure that you application is running;
  • Click on emulator and press: CTRL + M.

Some options will be opened, and you select the "Enable Live Reload" as the image below. Click to see the image

Comments

2

I found out that, If I execute react-native run-android from the console, then changing and saving file (with any editor) don't reload the app.

But When I execute the app from VS code console, the live reload was working for every change and save.

I think you might need a IDE (such as VS code) for live reloading.

1 Comment

You can actually enable it by pressing menu key or CTRL+m and selection "Enable live reload"
1

If someone try to Open the In-App Developer Menu in react native

Android -> CTRL + M or you can shake your device as well

and

IOS -> ⌘ + m (CMD + M) or shake device

if for some reason IOS Simulator was not working with some reason try to open

simulator -> Hardware -> Shake Gesture ( For me ^⌘Z)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.