React-native: Double tapping R after making a change in index.android.js doesn't reload the app.

Created on 14 Mar 2017  路  14Comments  路  Source: facebook/react-native

Description

Installed react native for android as per official docs. Ran the app. It loads in the emulator. But whenever I make a change in index.android.js and press R twice, it doesn't reload the app as mentioned.

Additional Information

  • React Native version: 0.42.0
  • Platform: Android
  • Operating System: OSX 10.11.6
  • Dev tools: Android studio
Locked

Most helpful comment

Figured it out.
cmd + M open the developer options. It has the option for hot reloading. Enabling that works.
It has to be mentioned in the docs.

All 14 comments

Figured it out.
cmd + M open the developer options. It has the option for hot reloading. Enabling that works.
It has to be mentioned in the docs.

You don't need to turn on hot reloading for refresh to work.

Still doesn't work for me. Enabled live reload in the developer options (Ctrl+M) and tried changing index.android.js.

Hot reload works though...

+1

found out that for android you need to enable keyboard in config.ini:

hw.keyboard=yes

@darthbinamira which config.ini ?

in ubuntu it is in ${HOME}/.android/avd/<avd name>/config.ini

This didn't solve the problem actually.

@darthbinamira thank you very much, works nicely!

@mqklin you're welcome! good to know it worked for you :)

@darthbinamira in Mac OSX same position. Thank you!

@fengerzh you're welcome! glad to be of help! :)

Hola, en mi caso uso Ubuntu pero corro la app en un dispositivo real, y no se actualiza agitando el dispositivo que hago?

Gracias

@3jFernando agita tu dispositivo hasta que aparezca el popup del men煤 y luego presiona "Enable Hot Reloading". Ahora cuando hagas los cambios en tu archivo ya se podr谩 ver en tu dispositivo.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jlongster picture jlongster  路  3Comments

upbit picture upbit  路  3Comments

janmonschke picture janmonschke  路  3Comments

lazywei picture lazywei  路  3Comments

axelg12 picture axelg12  路  3Comments