如下:
windows命令行开启react-native start
,开启成功,浏览器访问http://localhost:8081/index.android.bundle?platform=android
,返回对应 的js数据,USB开启调试功能,连接windows,windows命令行开启react-native run-android
,出现的第一行就是找不到服务器JS server not recognized, continuing with build...
,编译安装到手机上后,刚开始就显示,然后ReloadJS
,变成.
试过了很多方法,包括修改ip地址,以及react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --sourcemap-output android/app/src/main/assets/index.android.map --assets-dest android/app/src/main/res/
,以及react-native start --reset-cache
,adb reverse tcp:8081 tcp:8081,
全都不行,
百度+Google了两天时间都无果,无奈之下只能跑来求助。
求高人指点啊!