How to reload in the default Android emulator for react native app

前端 未结 7 1526
忘了有多久
忘了有多久 2020-12-23 20:00

I am using default Android emulator for running react native apps, I need to reload the app frequently, how do I do that?

And how can I set genymotion to set as defa

相关标签:
7条回答
  • 2020-12-23 20:21

    Press Ctrl + m, a menu will pop.

    for further ease. Enable Hot Reloading: whenever you make changes in your code it will reload itself; You won't have to reload again and again.

    0 讨论(0)
  • 2020-12-23 20:22

    to open dev menu with command line: adb shell input keyevent 82

    you can activate live reload there.

    I would suggest reading the doc if it wasn't already been done

    0 讨论(0)
  • 2020-12-23 20:23

    R+R works for android emulators.

    0 讨论(0)
  • 2020-12-23 20:28

    On my mac the dev menu is shown using the "fn" key + M

    0 讨论(0)
  • 2020-12-23 20:29

    I tried in this way:

    1. Open Android Studio, then Click Tools->Android->AVD Manager, as shown:

    2. Choose your virtual devices, then click edit this AVD,

    3. In Virtual Device Configuration, click Show Advanced Settings, scroll down to find Keyboard, then check Enable keyboard input checkbox, then click Finish button.

    4. Launch this AVD in emulator.

    5. In Terminal, in your react native project directory, run "react-native run-android".

    6. Your will see your app will be running in your emulator, if you want to reload the project, you could double tap R(you should type it very quickly, otherwise it may not reload js) or you can type command+M, then you choose Reload. Hope this will help. Cheers
    0 讨论(0)
  • 2020-12-23 20:29

    For Android emulator press "CTRL + M" with keyboard on emulator for reloading the react native project.

    0 讨论(0)
提交回复
热议问题