没有名为“cancelButtonTintColor”的成员在“JS::NativeActionSheetManager::SpecShowActionSheetWithOptionsOptions”中
描述
如何修复此错误。我已经使用最新版本创建了简单的项目,当尝试通过 Xcode 构建项目时,它会生成错误吗?
版本
0.67.3
输出
npxreact-native信息
OS: macOS 11.5.2
CPU: (8) x64 Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
Memory: 83.30 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.18.2 - /usr/local/opt/node@14/bin/node
Yarn: 1.22.15 - /usr/local/bin/yarn
npm: 6.14.15 - /usr/local/opt/node@14/bin/npm
Watchman: Not Found
Managers:
CocoaPods: 1.11.2 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
Android SDK: Not Found
IDEs:
Android Studio: 2020.3 AI-203.7717.56.2031.7583922
Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild
Languages:
Java: 15.0.2 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.67.3 => 0.67.3
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
重现步骤
请使用命令 init
新的 React Native 项目,并在 pod install 后尝试在 xcode
中构建项目
Description
How to fix this error. I have created simple project with latest version and when try to build the project via Xcode
it generate error?
Version
0.67.3
Output of
npxreact-native info
OS: macOS 11.5.2
CPU: (8) x64 Intel(R) Core(TM) i7-4980HQ CPU @ 2.80GHz
Memory: 83.30 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.18.2 - /usr/local/opt/node@14/bin/node
Yarn: 1.22.15 - /usr/local/bin/yarn
npm: 6.14.15 - /usr/local/opt/node@14/bin/npm
Watchman: Not Found
Managers:
CocoaPods: 1.11.2 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
Android SDK: Not Found
IDEs:
Android Studio: 2020.3 AI-203.7717.56.2031.7583922
Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild
Languages:
Java: 15.0.2 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.67.3 => 0.67.3
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
Please init
new react native project with command and try to build the project in the xcode
after pod install
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
每次 pod-install => 之后干净构建 XCode >产品>清理构建文件夹(command + shift + k)=>重建,那工作。
问题在于 rn > 0.67.0,pod-cache 指向旧文件。
https://github.com/facebook/react-native/commit/01856633a1d42ed3b26e7cc93a007d7948e1f76e
after each time pod-install => clean build XCode > Product > Clean Build Folder(command + shift + k) => rebuild, that work.
The problem is with rn > 0.67.0, pod-cache pointing to the old file.
https://github.com/facebook/react-native/commit/01856633a1d42ed3b26e7cc93a007d7948e1f76e
您可以将其创建到库源中,也可以避免它并使用其上方相同的 UIColor 选项。
我删除了:
([RCTConvert UIColor:options.cancelButtonTintColor() ? @( options.cancelButtonTintColor()) : nil];* )
并将其替换为:
( *[RCTConvert UIColor:options.tintColor() ? @(options.tintColor()) : nil]; )
我的行现在看起来像:
这不是更好的方法,但你可以做到与此同时,这是固定的。
You could create that into the library source or you could avoid it and use the same UIColor option just above it.
I removed:
( [RCTConvert UIColor:options.cancelButtonTintColor() ? @( options.cancelButtonTintColor()) : nil];* )
and replace it with:
( *[RCTConvert UIColor:options.tintColor() ? @(options.tintColor()) : nil]; )
my line now looks like:
it is not the better way, but you can do it in the meanwhile this is fixed.
pod 安装后清理构建文件夹对我有用,
在顶部导航栏中单击 Production --->清理构建文件夹
clean build folder after pod install worked for me
in top navigation bar click on Production ---> Clean Build Folder