[英]React Native app working on simulator but not on a android device
I made a react-native app which was running smoothly on the android simulator as well as Ios simulator.Later on when I made a debug apk and tried to test it on my device but it was showing the following error in the pic. 我制作了一个react-native应用程序,该应用程序在android模拟器以及Ios模拟器上均能流畅运行。
"dependencies": {
"@babel/runtime": "^7.1.2",
"aws-amplify": "^1.1.6",
"react": "16.5.0",
"react-native": "^0.57.1",
"react-native-paper": "^2.1.3",
"react-native-vector-icons": "^6.0.2",
"react-navigation": "^2.18.0",
"react-navigation-material-bottom-tabs": "^0.4.0",
"react-redux": "^5.0.7",
"redux": "^4.0.0",
"redux-promise": "^0.6.0"
},
Connect phone and server on same network, then run 将电话和服务器连接到同一网络,然后运行
adb reverse tcp:8081 tcp:8081
and restart app. 并重新启动应用程序。
Both the android device and your system should be connected to same network. android设备和您的系统都应连接到同一网络。 Simple way is to connect your phone's hotspot to the system. 简单的方法是将手机的热点连接到系统。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.