Ios React本机0.60升级:未知类型名称';MutexType';
我正在将我的应用程序升级为React Native v0.60.4。我完成了documentation and upgrade helper中的所有步骤,但在尝试为iOS构建应用程序时,Ios React本机0.60升级:未知类型名称';MutexType';,ios,xcode,react-native,Ios,Xcode,React Native,我正在将我的应用程序升级为React Native v0.60.4。我完成了documentation and upgrade helper中的所有步骤,但在尝试为iOS构建应用程序时,glog的构建失败,出现以下错误: .../app/ios/Pods/glog/src/base/mutex.h:147:3: error: Need to implement mutex.h for your architecture, or #define NO_THREADS # error Need to
glog
的构建失败,出现以下错误:
.../app/ios/Pods/glog/src/base/mutex.h:147:3: error: Need to implement mutex.h for your architecture, or #define NO_THREADS
# error Need to implement mutex.h for your architecture, or #define NO_THREADS
^
.../app/ios/Pods/glog/src/base/mutex.h:188:3: error: unknown type name 'MutexType'
MutexType mutex_;
找不到任何解决问题的方法
我的播客文件:
platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
target '...app' do
# Uncorm mment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/React'
pod 'React-DevSupport', :path => '../node_modules/react-native/React'
pod 'React-fishhook', :path => '../node_modules/react-native/Libraries/fishhook'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSocket'
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
# Pods for ...app
pod 'Firebase/Core', '~> 5.15.0'
pod 'Firebase/Performance'
pod 'Firebase/Storage'
target '...appTests' do
inherit! :search_paths
# Pods for testing
end
use_native_modules!
end
我通过在
iOS/Pods/glog/src/config.h
中的文件config.h
的底部添加define NO_THREADS
解决了这个问题。但我还有另一个与glog相关的问题。我不确定这是否是解决问题的正确方法。我通过在iOS/Pods/glog/src/config.h
文件config.h
的底部添加define NO_THREADS
解决了这个问题。但我还有另一个与glog相关的问题。我不确定这是否是解决问题的正确方法。对于未来的谷歌用户来说,这是因为(据我所知)RN在pod安装过程中生成的配置脚本无法正确检测macOS上是否包含pthreads支持。这似乎是由于Xcode 11和Xcode 12之间存在一些差异,因为降级的人说问题消失了
在任何情况下,以下几点对我都有效:
- 打开
并在文件中的任意位置添加ios/Pods/Flipper Glog/src/config.h
,并将定义HAVE_PTHREAD 1
标志更改为HAVE_rBlock
。\define HAVE rBlock 1
- 打开ios/Pods/glog/src/config.h并执行相同的操作。您需要同时执行这两个库
做出这样的改变使事情对我起了作用。这不仅仅是强迫它工作,它还纠正了以前工作过的东西。我在以前的项目中验证了这些字段的设置是否正确(并且pthread支持在macOS、模拟器和iOS中广泛存在)。对于未来的Google用户来说,这是因为(据我所知)在pod安装期间生成的配置脚本RN无法正确检测macOS上是否包含pthreads支持。这似乎是由于Xcode 11和Xcode 12之间存在一些差异,因为降级的人说问题消失了 在任何情况下,以下几点对我都有效:
- 打开
并在文件中的任意位置添加ios/Pods/Flipper Glog/src/config.h
,并将定义HAVE_PTHREAD 1
标志更改为HAVE_rBlock
。\define HAVE rBlock 1
- 打开ios/Pods/glog/src/config.h并执行相同的操作。您需要同时执行这两个库
做出这样的改变使事情对我起了作用。这不仅仅是强迫它工作,它还纠正了以前工作过的东西。我在以前的项目中验证了这些字段的设置是否正确(在macOS、模拟器和iOS中,pthread支持非常普遍)。查看此内容并比较文档。在过去的一周中,我一直在努力解决这一问题。有人找到解决办法了吗?有幸运的人吗?查看此文档并比较文档。在过去一周中一直在努力解决此问题。有人找到解决办法吗?有幸运的人吗?谢谢分享!是的,我也尝试过这种方法,但后来格洛格在不同的问题上失败了。你们找到了什么解决方案吗?谢谢分享!是的,我也尝试过这种方法,但后来格洛格在不同的问题上失败了。你们找到了解决方案吗?