react-native dosent update any code

Created on 5 Jul 2017  Â·  10Comments  Â·  Source: facebook/react-native

my steps:
1.installed node.js
2.npm install -g react-native-cli
3.react-native init AwesomeProject
4.1.cmd=mkdir android/app/src/main/assets
4.2.cmd=react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
4.3.react-native run-android (react packager ready and building 100% with any error)
Showing app default index.android.js
after that i close everything and change simple code in index.android.js
run again with react-native run-android (react packager ready and building 100% with any error)
showing me again default index.android.js
why this happening to me ?
Windows 7,real device android 4.2.2 with usb connected

Locked

Most helpful comment

I too facing the same problem my OS is windows 10.

react-native run android and got the error in the emulator unable to load script from assets 'index.android.bundle'...

All 10 comments

It seems like a setup issue.

Why did you bundle JavaScript if you want it reloadable?

You don't have to close everything, you should see some logs in your packager if your application is correctly connected and doesn't already contained a bundle.

thanks for your answer. if i dont use step 4 i geting this error

unable to load script from assets 'index.android.bundle'. make sure your bundle is packaged correctly or you're runnig packager server.

and after your answer, i delete my bundle and i re-create. its worked.i will write bash script every run i delete it and re-create it.

my packager only show me

React packager ready.

Loading dependency graph, done.

Hey, thanks for reporting this issue!

It looks like your description is missing some necessary information. Can you please add all the details specified in the template? This is necessary for people to be able to understand and reproduce the issue being reported.

I am going to close this, but feel free to open a new issue with the additional information provided. Thanks!

Install yarn from internet or choco before 'react-native init awesomeproject'.(it takes time)
That's it.
You can directly start project 'cd awesomeproject' n 'react-native run-android'
No need of making assets directory.

Reply if it doesn't work

same error,
unable to load script from assets 'index.android.bundle'...

Uuu

i have the same problem

i have the same problem

I too facing the same problem my OS is windows 10.

react-native run android and got the error in the emulator unable to load script from assets 'index.android.bundle'...

i found solution at last ♥
here's my steps:
1-install or upgrade all react native stuffs
2-react-native init projectname
3-cd projectname
4-cmd(1) yarn start eject
5-cmd(2) react-native run-android
6-after opened "red screen app" click dismis
7-inside of app click menu, select "dev settings"
8-select "debug server host & port for ... " write your pc ip like 192.168.1.2:8081
9-close app and open app
if it dosent work contact with me here maybe i can help you about that

Was this page helpful?
0 / 5 - 0 ratings