简体   繁体   English

错误 build react native ios use yarn ios new project

[英]Error build react native ios use yarn ios new project

I want to build ios with xcode 12.4, ios14.4 with react native.我想用 xcode 12.4 构建 ios,用 react native 构建 ios14.4。 the error like this像这样的错误

** BUILD FAILED **


The following build commands failed:
        PhaseScriptExecution [CP-User]\ Generate\ Specs /Users/user/Library/Developer/Xcode/DerivedData/testIos2-gadmwivyqenuohhdfabybpprezqk/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/FBReactNativeSpec.build/Script-46EB2E00015310.sh
(1 failure)

Please someone help me, i am using intel mac os catalina and this my pod file请有人帮助我,我正在使用英特尔 mac os catalina,这是我的 pod 文件

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '12.4'
install! 'cocoapods', :deterministic_uuids => false

production = ENV["PRODUCTION"] == "1"

target 'cobaIos' do
  config = use_native_modules!

  # Flags change depending on the env values.
  flags = get_default_flags()

  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :production => production,
    :hermes_enabled => flags[:hermes_enabled],
    :fabric_enabled => flags[:fabric_enabled],
    :flipper_configuration => FlipperConfiguration.enabled,
    # An absolute path to your application root.
    :app_path => "#{Pod::Config.instance.installation_root}/.."
  )

  target 'cobaIosTests' do
    inherit! :complete
    # Pods for testing
  end


  post_install do |installer|
    react_native_post_install(installer)
    __apply_Xcode_12_5_M1_post_install_workaround(installer)
  end
end

thank you i hope it can be solve because it takse 2 day and not solving anymore谢谢,我希望它可以解决,因为它需要 2 天并且不再解决

The error is because of mix matched version of react native and flipper.该错误是由于混合匹配版本的反应本机和鳍状肢。

for react-native 63+ it should be following对于 react-native 63+ 它应该遵循

use_flipper!({ 'Flipper' => '0.58.0' }) then run pod install use_flipper!({ 'Flipper' => '0.58.0' })然后run pod install

More more clarity go through this documentation for manual setup : https://fbflipper.com/docs/getting-started/react-native-ios/更清楚地阅读此文档以进行手动设置: https ://fbflipper.com/docs/getting-started/react-native-ios/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM