Running my project in android studio I get that error, I just installed everything and I followed everything step by step, I'm using genymotion
as an emulator, and use react-native start
from the root, check port 8081, disable instant run, everything which is the following link
Unable to load script.Make sure you are either running a Metro server or that your bundle 'index.android.bundle' is packaged correctly for release
First of all make sure you have started the bundler
using this command in root directory:
npm start
or
react-native start
If doesn't work add assets folder manually in the following directory
android/app/src/main/{assets}
After that rename index.android.js
to index.js
then use the following command:
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
Now you can create your apk
:
react-native run-android
"react-native": "0.64.1",
I've resolved this problem with changing bundleInDebug: true,
in project.ext.react
in android > app > build.gradle
.
project.ext.react = [
bundleInDebug: true,
enableHermes: ***,
]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With