英文:
Unable to load script.Make sure you are either running a Metro server ( React Native )
问题
当我打开两个终端时:
npx react-native start
npx react-native run-android
实际上,在运行 run-android
时没有出现错误,但在第一个窗口中,Metro Bundler 不起作用。
- 我尝试从设备/模拟器中删除应用程序,但没有起作用。
- 我尝试删除
.gradle
文件夹,运行./gradlew clean
,然后再次尝试运行,但仍然显示相同的问题。
英文:
when i open 2 terminal
npx react-native start
npx react-native run-android
actually there are no error while running run-android,
but at the first window, metro bundler doesn't work
- I try to delete the application from device / emulator, doesn't work at all
- I try delete .gradle folder and run ./gradlew clean, and try to run again but still show the same issue
答案1
得分: 0
I have fix this issue by removing this line:
从 app/src/main/AndroidManifest.xml
中删除以下内容:
android:networkSecurityConfig="@xml/network_security_config"
英文:
I have fix this issue by removing this line:
android:networkSecurityConfig="@xml/network_security_config"
From app/src/main/AndroidManifest.xml
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论