react-native Android真机测试

先执行

react-native start

出现错误

Unable to resolve module `@babel/runtime/helpers/interopRequireDefault`

执行

npm i @babel/runtime

再次运行react-native start,成功

访问http://localhost:8081/index.bundle?platform=android得到一个js文件。说明运行成功,接下来连接到手机。

手机用USB线连接到笔记本

执行

react-native run-android

猜你喜欢

转载自blog.csdn.net/Night_Emperor/article/details/82857935