2
votes

enter image description here

First When I created the app with react-native init project1 . I was getting an error as below

Unable to load script from assets index.android.bundle on windows

Later I solved this issue by running following commands Stackoverflow link

mkdir android/app/src/main/assets

react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res

react-native run-android

But later I am getting an error like this and not able to solve, Module HMRClient is not a registered callable module (calling enable)

4

4 Answers

6
votes

This is the common occurred problem, but there will not be some problem in bundling the app, Just follow some common steps and it worked for me. Delete node_module folder and install npm

rm -rf node_modules && npm install

cd android && ./gradlew clean

then cd .. && react-native run-android

2
votes

Disable hot reloading, it will work fine

2
votes

If you're developing a native module and your npm link'd folder contains a node_modules directory, this can also produce the error.

To correct for this case, you can delete the node_modules directory, re-install your project in the linked folder and use react-native start --reset-cache.

1
votes

This issue occurs if we enabled the production mode from dev setting by unchecking "JS Dev Mode" and then try to enable the hot reload. Enable JS Dev Mode again will work.