gpt4 book ai didi

javascript - react native 运行 ios 构建失败,因为 'LogSeverity'

转载 作者:行者123 更新时间:2023-11-28 23:51:41 33 4
gpt4 key购买 nike

"react": "16.3.1",
"react-native": "0.55.4",

这是我的 react native 版本当我尝试在 mac os 上运行项目并以类似方式打开 run-ios 项目时,但是,我在构建方面遇到了麻烦,并且失败了,我到处寻找但没有答案。

我把错误放在下面。

/Users/peyman/Desktop/myproject/ios/Pods/glog/src/glog/logging.h:638:1: 
error: unknown type name 'LogSeverity'
LogSeverity NormalizeSeverity(LogSeverity s);
^
/Users/peyman/Desktop/myproject/ios/Pods/glog/src/glog/logging.h:638:31:
error: unknown type name 'LogSeverity'
LogSeverity NormalizeSeverity(LogSeverity s);
^
/Users/peyman/Desktop/myproject/ios/Pods/glog/src/glog/logging.h:1163:42: error: unknown type name 'LogSeverity'
LogMessage(const char* file, int line, LogSeverity severity, int ctr,
^
/Users/peyman/Desktop/myproject/ios/Pods/glog/src/glog/logging.h:1181:42:
error: unknown type name 'LogSeverity'
LogMessage(const char* file, int line, LogSeverity severity);
^
/Users/peyman/Desktop/myproject/ios/Pods/glog/src/glog/logging.h:1186:42:
error: unknown type name 'LogSeverity'
LogMessage(const char* file, int line, LogSeverity severity, LogSink* sink,
^
/Users/peyman/Desktop/myproject/ios/Pods/glog/src/glog/logging.h:1192:42:
error: unknown type name 'LogSeverity'
LogMessage(const char* file, int line, LogSeverity severity,
^
/Users/peyman/Desktop/myproject/ios/Pods/glog/src/glog/logging.h:1198:42:
error: unknown type name 'LogSeverity'
LogMessage(const char* file, int line, LogSeverity severity,
^
/Users/peyman/Desktop/myproject/ios/Pods/glog/src/glog/logging.h:1242:41:
error: unknown type name 'LogSeverity'
void Init(const char* file, int line, LogSeverity severity,
^
/Users/peyman/Desktop/myproject/ios/Pods/glog/src/glog/logging.h:1249:30:
error: use of undeclared identifier 'NUM_SEVERITIES'
static int64 num_messages_[NUM_SEVERITIES]; /
/ under log_mutex
^
/Users/peyman/Desktop/myproject/ios/Pods/glog/src/glog/logging.h:1275:3:
error: no matching constructor for initialization of 'google::LogMessage'
LogMessage(__FILE__, __LINE__, severity).stream() << msg;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/peyman/Desktop/myproject/ios/Pods/glog/src/glog/logging.h:1202:3:
note: candidate constructor not viable: no known conversion from 'const int'
to 'const google::CheckOpString' for 3rd argument
LogMessage(const char* file, int line, const CheckOpString& result);
^
/Users/peyman/Desktop/myproject/ios/Pods/glog/src/glog/logging.h:1174:3:
note: candidate constructor not viable: requires 2 arguments, but 3 were
provided
LogMessage(const char* file, int line);
^
/Users/peyman/Desktop/myproject/ios/Pods/glog/src/glog/logging.h:1258:3:
note: candidate constructor not viable: requires 1 argument, but 3 were
provided
LogMessage(const LogMessage&);
^
/Users/peyman/Desktop/myproject/ios/Pods/glog/src/glog/logging.h:1304:47:
error: unknown type name 'LogSeverity'
ErrnoLogMessage(const char* file, int line, LogSeverity severity, int ctr,
^
/Users/peyman/Desktop/myproject/ios/Pods/glog/src/glog/logging.h:1331:41:
error: unknown type name 'LogSeverity'
GOOGLE_GLOG_DLL_DECL void FlushLogFiles(LogSeverity min_severity);
^
/Users/peyman/Desktop/myproject/ios/Pods/glog/src/glog/logging.h:1336:47:
error: unknown type name 'LogSeverity'
GOOGLE_GLOG_DLL_DECL void FlushLogFilesUnsafe(LogSeverity min_severity);
^
/Users/peyman/Desktop/myproject/ios/Pods/glog/src/glog/logging.h:1343:45:
error: unknown type name 'LogSeverity'
GOOGLE_GLOG_DLL_DECL void SetLogDestination(LogSeverity severity,
^
/Users/peyman/Desktop/myproject/ios/Pods/glog/src/glog/logging.h:1352:41:
error: unknown type name 'LogSeverity'
GOOGLE_GLOG_DLL_DECL void SetLogSymlink(LogSeverity severity,
^


** BUILD FAILED **


The following commands produced analyzer issues:

Analyze Base/RCTModuleMethod.mm normal x86_64
(1 command with analyzer issues)

The following build commands failed:
CompileC

/Users/peyman/Desktop/myproject/ios/build/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/glog.build/Objects-normal/x86_64/raw_logging.o glog/src/raw_logging.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler CompileC /Users/peyman/Desktop/myproject/ios/build/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/glog.build/Objects-normal/x86_64/signalhandler.o glog/src/signalhandler.cc normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (2 failures) "

  • 节点版本:10.8.0
  • 守望者版本:4.9.0
  • 我正在使用最新版本的 xcode
  • 在 vmware 上运行 mac os
  • 主窗口为 10

提前致谢。

最佳答案

修复了它

在 ios 文件夹中我删除了 pod和 podfile.lock

然后安装pod

关于javascript - react native 运行 ios 构建失败,因为 'LogSeverity',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51912622/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com