简体   繁体   中英

React-Native new ios project not building. RCT-Folly Semantic issues

I followed the steps in https://reactnative.dev/docs/environment-setup and after initializing the app, when I went to build my app, it gives me this error in terminal:

** BUILD FAILED **


The following build commands failed:
    CompileC /Users/----/Library/Developer/Xcode/DerivedData/AwesomeProject-fneeqrmgpvoyyygpzbykmsofeknl/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RCT-Folly.build/Objects-normal/x86_64/SysUio.o /Users/asaadat/Documents/CollegeStuff/EECS\ 441/test_app/AwesomeProject/ios/Pods/RCT-Folly/folly/portability/SysUio.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'RCT-Folly' from project 'Pods')
    CompileC /Users/----/Library/Developer/Xcode/DerivedData/AwesomeProject-fneeqrmgpvoyyygpzbykmsofeknl/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RCT-Folly.build/Objects-normal/x86_64/NetOps.o /Users/asaadat/Documents/CollegeStuff/EECS\ 441/test_app/AwesomeProject/ios/Pods/RCT-Folly/folly/net/NetOps.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'RCT-Folly' from project 'Pods')
(2 failures)

in xcode when I try to build the ios app, it shows me this: xcode screenshot

I've tried reinstalling the pods and pod repo update and even starting the tutorial over. I've also deleted node_modules and did npm install again. Still same error. I'm on React-Native 0.66.

I'm new to developing with react-native and ios and I'm confused why a brand new project is showing this.

Here is my Podfile:

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

platform :ios, '11.0'

target 'AwesomeProject' do
  config = use_native_modules!

  use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => false
  )

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

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable the next line.
  use_flipper!()

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

I had made a fuller answer so we could collaboratively come up with a better answer. But since it was erased, I'll be more direct in the "solution".

Comment out line typedef uint8_t clockid_t; in file Pods/RCT-Folly/folly/portability/Time.h . Comment by prefixing with // .

This thread helped me a lot: https://github.com/facebook/flipper/issues/834#

I changed the min Version from 10 to 12: __IPHONE_OS_VERSION_MIN_REQUIRED > __IPHONE_12_0 in Pods>RTC-Folly>Time where the error occurs to fix the issue.

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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