Search code examples
androidreact-nativenpx

Unable to load script.Make sure you are either running a Metro server ( React Native )


when i open 2 terminal

  1. npx react-native start
  2. npx react-native run-android

actually there are no error while running run-android, but at the first window, metro bundler doesn't work

  1. I try to delete the application from device / emulator, doesn't work at all
  2. I try delete .gradle folder and run ./gradlew clean, and try to run again but still show the same issue

Solution

  • I have fix this issue by removing this line:

    android:networkSecurityConfig="@xml/network_security_config"
    

    From app/src/main/AndroidManifest.xml