由于“ LogSeverity”

时间:2018-08-18 21:18:08

标签: javascript ios reactjs react-native mobile-application

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

这是我的本机版本 当我尝试在similatur中打开run-ios项目在mac os上运行项目时,但是我在构建时遇到麻烦,失败了,我发现所有地方,但没有答案。

将错误放在下面。

/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普通的x86_64 c ++ com.apple.compilers.llvm.clang.1_0.compiler       CompileC /用户/peyman/Desktop/myproject/ios/build/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/glog.build/Objects-normal/x86_64/signalhandler.o glog / src / signalhandler.cc正常x86_64 c ++ com.apple.compilers.llvm.clang.1_0.compiler   (2次失败)   “

  • 节点版本:10.8.0
  • watchman版本:4.9.0
  • 和即时通讯使用最新版本的xcode
  • 在vmware上运行mac操作系统
  • 主窗口是10个

谢谢。

2 个答案:

答案 0 :(得分:1)

您的项目ios文件夹,请删除以下文件和文件夹:

  • pods文件夹
  • podfile.lock
  • 然后从ios文件夹中安装Pod,例如{path} => pod install

答案 1 :(得分:0)

使用

修复了它

在ios文件夹中的IM删除窗格 和podfile.lock

然后安装pod