react native 提示Unable to load script.Make错误的解决方法

2024年08月09日

安卓真机上调试react native项目的时候会报错:

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.

vCZZs.png

解决办法:

npx react-native start
adb reverse tcp:8081 tcp:8081

 

© 1987 - 2023 张晓刚 版权所有

浙ICP备16002143号-1