简体   繁体   English

React Native应用程序可在模拟器上运行,但不能在Android设备上运行

[英]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.

相关问题 React Native 应用程序立即在设备上崩溃但在模拟器上工作? - React Native app crashes immediately on device but works on simulator? React Native,在模拟器或设备上调试? - React native, debug on simulator or device? react-native apk 无法在 android 设备上运行 - react-native apk not working on the android device 在Android FireTV设备上反应Native App - React Native App on Android FireTV device React Native PanResponder 不适用于 Android 设备 - React Native PanResponder not working on Android device React本机应用程序不会在Android设备上加载 - React native app wont load on android device 无法在具有React-Native-Maps依赖关系的Android设备或模拟器上运行React Native Project - Cannot run React Native Project on Android Device or Simulator with React-Native-Maps dependency React Native:仅当调试打开且仅在Android上时,App才会在模拟器中崩溃 - React Native: App crashes in simulator only when debugging is on and only on Android React-Native,Pdf 显示在 android 模拟器上,但在实际的 android 设备上出现错误 - React-Native, Pdf showing on android simulator but getting error on actual android device 带有Native C ++ Library的Android Instant App无法发布到运行Android N的设备/模拟器 - Android Instant App with Native C++ Library not publishing to device/simulator running Android N
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM