【问题标题】:Errors after update, BigSur 11.3 XCode 12.5 (12E262) React-Native and Expo更新后的错误,BigSur 11.3 XCode 12.5 (12E262) React-Native 和 Expo
【发布时间】:2021-04-28 13:34:17
【问题描述】:

将 BigSur 升级到 11.3,Xcode 升级到 12.5,iOS 升级到 14.5 后,我无法在真机和模拟器中运行 iOS 应用。

React-Native --> react-native run-ios

kikirim@Levent-MacBook-Pro test % react-native run-ios
error Could not find "Podfile.lock" at /Users/kikirim/Desktop/React-Native/test/ios/Podfile.lock. Did you run "pod install" in iOS directory?
info Found Xcode project "test.xcodeproj"
xcrun: error: active developer path ("/Volumes/MacOS/MacOs_Prog/Xcode-12.5.app/Contents/Developer") does not exist
Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the standalone command line developer tools.
See `man xcode-select` for more details.
(node:5077) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
error Could not get the simulator list from Xcode. Please open Xcode and try running project directly from there to resolve the remaining issues.
Error: Command failed: xcrun simctl list --json devices
xcrun: error: active developer path ("/Volumes/MacOS/MacOs_Prog/Xcode-12.5.app/Contents/Developer") does not exist
Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the standalone command line developer tools.
See `man xcode-select` for more details.

    at checkExecSyncError (child_process.js:616:11)
    at Object.execFileSync (child_process.js:634:15)
    at runOnSimulator (/Users/kikirim/Desktop/React-Native/test/node_modules/@react-native-community/cli-platform-ios/build/commands/runIOS/index.js:164:54)
    at Object.runIOS [as func] (/Users/kikirim/Desktop/React-Native/test/node_modules/@react-native-community/cli-platform-ios/build/commands/runIOS/index.js:121:12)
    at Command.handleAction (/Users/kikirim/Desktop/React-Native/test/node_modules/@react-native-community/cli/build/index.js:186:23)
    at Command.listener (/Users/kikirim/Desktop/React-Native/test/node_modules/commander/index.js:315:8)
    at Command.emit (events.js:315:20)
    at Command.parseArgs (/Users/kikirim/Desktop/React-Native/test/node_modules/commander/index.js:651:12)
    at Command.parse (/Users/kikirim/Desktop/React-Native/test/node_modules/commander/index.js:474:21)
    at setupAndRun (/Users/kikirim/Desktop/React-Native/test/node_modules/@react-native-community/cli/build/index.js:265:24)
info Run CLI with --verbose flag for more details.
kikirim@Levent-MacBook-Pro test % 

React-Expo --> npm 运行 ios

** BUILD FAILED **


The following build commands failed:
        CompileC /Users/kikirim/Library/Developer/Xcode/DerivedData/text-gncpkkxvjxsnedbswzsxcynreivq/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper-Folly.build/Objects-normal/x86_64/DistributedMutex.o /Users/kikirim/Desktop/React-Native/text/ios/Pods/Flipper-Folly/folly/synchronization/DistributedMutex.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

【问题讨论】:

    标签: xcode react-native expo updates macos-big-sur


    【解决方案1】:

    Flipper 似乎有问题。我没有使用 Flipper,所以我只是将其注释掉。

    1. cd ios
    2. 从 podfile 中评论 Flipper:

    use_flipper!()

    post_install 做 |installer|

    react_native_post_install(安装程序)

    结束

    1. 运行“pod deintegrate”
    2. pod 安装
    3. cd ..
    4. npm 运行 ios

    【讨论】:

    • 谢谢,它成功了。更新到 BigSur 11.3 后
    【解决方案2】:

    您应该按照以下步骤更新 react native:

    https://react-native-community.github.io/upgrade-helper

    否则你将面临多个问题。

    【讨论】:

      猜你喜欢
      • 2021-07-21
      • 2020-04-16
      • 2018-08-24
      • 2022-06-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-01-29
      相关资源
      最近更新 更多