运行react-native run-android时出现错误app:installDebug

时间:2019-06-19 05:03:17

标签: react-native react-native-android react-scripts

我正在尝试对本机运行android我的项目进行反应,它停留在99%并显示网络异常。我尝试通过Usb同时使用android studio模拟器和我的设备,而且总是一样。

我曾尝试adb kill-server && adb start-server,但没有用

 [DeviceMonitor]: Connection attempts: 17
[DeviceMonitor]: Unable to open connection to: localhost/36.86.63.182:5037, due to: java.net.ConnectException: Operation timed out
[DeviceMonitor]: Connection attempts: 18
[DeviceMonitor]: Unable to open connection to: localhost/36.86.63.182:5037, due to: java.net.ConnectException: Operation timed out
[DeviceMonitor]: Connection attempts: 19
[DeviceMonitor]: Unable to open connection to: localhost/36.86.63.182:5037, due to: java.net.ConnectException: Operation timed out
[DeviceMonitor]: Connection attempts: 20
[DeviceMonitor]: Unable to open connection to: localhost/36.86.63.182:5037, due to: java.net.SocketException: Network is unreachable
[DeviceMonitor]: Connection attempts: 21
[DeviceMonitor]: Unable to open connection to: localhost/36.86.63.182:5037, due to: java.net.SocketException: Network is unreachable
[DeviceMonitor]: Connection attempts: 22
[DeviceMonitor]: Unable to open connection to: localhost/36.86.63.182:5037, due to: java.net.SocketException: Network is unreachable
[DeviceMonitor]: Connection attempts: 23
[DeviceMonitor]: Unable to open connection to: localhost/36.86.63.182:5037, due to: java.net.SocketException: Network is unreachable
[DeviceMonitor]: Connection attempts: 24
[DeviceMonitor]: Unable to open connection to: localhost/36.86.63.182:5037, due to: java.net.SocketException: Network is unreachable
[DeviceMonitor]: Connection attempts: 25
[DeviceMonitor]: Unable to open connection to: localhost/36.86.63.182:5037, due to: java.net.ConnectException: Connection refused
[DeviceMonitor]: Connection attempts: 26
[DeviceMonitor]: Unable to open connection to: localhost/36.86.63.182:5037, due to: java.net.ConnectException: Connection refused
[DeviceMonitor]: Connection attempts: 27
[DeviceMonitor]: Unable to open connection to: localhost/36.86.63.182:5037, due to: java.net.ConnectException: Connection refused
[DeviceMonitor]: Connection attempts: 28
[DeviceMonitor]: Unable to open connection to: localhost/36.86.63.182:5037, due to: java.net.ConnectException: Connection refused
[DeviceMonitor]: Connection attempts: 29
[DeviceMonitor]: Unable to open connection to: localhost/36.86.63.182:5037, due to: java.net.ConnectException: Connection refused
[DeviceMonitor]: Connection attempts: 30
[DeviceMonitor]: Unable to open connection to: localhost/36.86.63.182:5037, due to: java.net.ConnectException: Connection refused
[DeviceMonitor]: Connection attempts: 31
<============-> 99% EXECUTING [16m 31s]
> :app:installDebug

环境:

 React Native Environment Info:
    System:
      OS: macOS 10.14.2
      CPU: x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
      Memory: 32.66 MB / 8.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 10.16.0 - /usr/local/bin/node
      npm: 6.9.0 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 11.4, macOS 10.13, tvOS 11.4, watchOS 4.3
      Android SDK:
        Build Tools: 22.0.1, 23.0.2, 24.0.0, 24.0.3, 25.0.0, 25.0.3, 26.0.2, 27.0.3, 28.0.2, 28.0.3
        API Levels: 21, 23, 24, 25, 27, 28
    IDEs:
      Android Studio: 3.4 AI-183.5429.30.34.5452501
      Xcode: 9.4/9F1027a - /usr/bin/xcodebuild
    npmPackages:
      react: 16.4.1 => 16.4.1 
      react-native: 0.56.0 => 0.56.0 
    npmGlobalPackages:
      react-native-cli: 2.0.1

0 个答案:

没有答案