React Native BUILD SUCCEED, but “No devices are booted.”

后端 未结 9 1380
一整个雨季
一整个雨季 2021-01-31 20:57

Here\'s my environment:

➜  AwesomeProject node --version
v6.3.0
➜  AwesomeProject npm --version
3.10.3
➜  AwesomeProject react-native --version
react-native-cli: 1.0.         


        
相关标签:
9条回答
  • 2021-01-31 21:08

    Try NOT running the command react-native run-ios as root

    0 讨论(0)
  • 2021-01-31 21:10

    I rebooted the simulator as suggested above tried config reset but no luck.

    However while the simulator is open, I went to /Users/username/projectdirectorry/AwesomeProject/ios/build

    dragged the AwesomeProject.app on the simulator and it is worked.

    0 讨论(0)
  • 2021-01-31 21:15

    I ran into this problem when I ran react-native run-ios within the terminal multiplexer tmux. I fixed it by running react-native run-ios in a normal terminal tab without tmux running.

    0 讨论(0)
  • 2021-01-31 21:18

    I have the same problem when first time to run react-native run-ios Try Hardware -> Reboot the simulator, and run it again.

    0 讨论(0)
  • 2021-01-31 21:21

    I have just solved the same question.

    First try using react-native run-ios instead of the sudo react-native run-ios.

    Next try the following:

    In file AppDelegate.m, change

    jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"];
    

    To:

    jsCodeLocation = [NSURL URLWithString:@"http://127.0.0.1:8081/index.ios.bundle?platform=ios&dev=true"];
    

    (This may be a security issue with iOS 9);

    Next try to reset your env.

    0 讨论(0)
  • 2021-01-31 21:25

    When hitting react-native run-ios, one of the first lines printed to console, would be something like this (or similar)

    Launching iPhone 6 (10.0)...
    
    1. Boot the respective simulator manually
      • Go to spotlight search and start to type simulator
      • When spotlight presents the search result, choose the simulator app and hit Enter
      • Go to simulator app's menu: Hardwire -> Device -> iOS 10.0 -> iPhone 6 and select it
    2. Reset
      • Go to simulator app's menu: Simulator -> Reset Content and Settings...
    3. Retry
      • Command react-native run-ios again
    0 讨论(0)
提交回复
热议问题