本文介绍了React Native glog iOS:未知类型名称'_START_GOOGLE_NAMESPACE_'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经构建了一个运行良好的 react native android 项目.然后我从 iOS 部分开始.我正在使用 react-native-cli: 2.0.1 react-native: 0.60.4 和 Xcode 10 和 Mac OS Mojave

I already built an android project of react native which is working fine. I then started with iOS part. I am using react-native-cli: 2.0.1 react-native: 0.60.4 and Xcode 10 and Mac OS Mojave

默认的 pod 文件在安装 glog 时出现了一些问题它给出了错误 /bin/bash: ./configure:/bin/sh^M: bad interpreter: No such file or directorypod install 已执行.即使在 GitHub 上做了所有回答和堆栈溢出之后,比如安装 Cocoapods,重新安装,ruby 安装,链接 cocoapods.后来在 GitHub 上,我发现 pod 文件有一些问题,因此将其替换为 GitHub 上为 react-native 指定的正确内容.根据此链接仍然没有工作:https://forums.expo.io/t/pod-install-errors-on-newly-detached-app-on-macos-installing-glog-bin-bash-configure-bin-sh-m-bad-interpreter-no-such-file-or-directory/10054 然后我修改了glog文件,然后安装成功.

The default pod file had some issues installing glog It gave error /bin/bash: ./configure: /bin/sh^M: bad interpreter: No such file or directory when pod install was executed. Even after doing everything answered on GitHub and stack overflow like installing Cocoapods, reinstalling, ruby installation, linking cocoapods. Then later on GitHub I found out that pod file had some issues so replaced it with correct content specified on GitHub for react-native. Still did not work then according to this link : https://forums.expo.io/t/pod-install-errors-on-newly-detached-app-on-macos-installing-glog-bin-bash-configure-bin-sh-m-bad-interpreter-no-such-file-or-directory/10054 and then I modified the glog file and then it installed the glog successfully.

在那之后 glog 的另一个问题 需要为您的架构实现 mutex.h,或者 #define NO_THREADS 我通过在 ios/Pods/glog 中添加 define no_thread 来纠正/src/config.h 文件

After that another issue with glog Need to implement mutex.h for your architecture, or #define NO_THREADS which I corrected by adding define no_thread in ios/Pods/glog/src/config.h file

现在坚持这个

/Volumes/Projects/derive-mobile/ios/Pods/glog/src/utilities.h:148:1:未知类型名称_START_GOOGLE_NAMESPACE_"/Volumes/Projects/derive-mobile/ios/Pods/glog/src/utilities.h:168:1:未知类型名称int64";您的意思是google::int64"吗?/Volumes/Projects/derive-mobile/ios/Pods/glog/src/utilities.h:170:20: 未知类型名称int64";您的意思是google::int64"吗?/Volumes/Projects/derive-mobile/ios/Pods/glog/src/utilities.h:175:1:未知类型名称int32";您的意思是google::int32"吗?/Volumes/Projects/derive-mobile/ios/Pods/glog/src/utilities.h:236:1:未知类型名称_END_GOOGLE_NAMESPACE_"/Volumes/Projects/derive-mobile/ios/Pods/glog/src/utilities.h:150:1:预期的不合格ID

我认为我的 glog 安装不顺利.我已经在使用项目工作区了.

I think my glog installation did not go well. I am using project workspace already.

我已经检查了整个 GitHub Facebook react-native 和堆栈溢出,但没有发现任何东西.我尝试过遗留构建,清除派生数据.我也试过 pod deintegrate 和 pod install.对于 glog 我也试过 cd ./node_modules/react-native/third-party/glog-0.3.4 &&../../scripts/ios-configure-glog.sh

I have checked overall GitHub Facebook react-native and stack overflow but did not found anything. I have tried legacy build, clearing derived data. I have also tried pod deintegrate and pod install. for glog I have also tried cd ./node_modules/react-native/third-party/glog-0.3.4 && ../../scripts/ios-configure-glog.sh

我该如何解决这个问题?有什么方法可以完全删除 glog 并重新安装它而无需 /bin/bash: ./configure:/bin/sh^M: bad interpreter: No such file or directory as none of解决方案如上所述

How can I solve this issue ? is there any way to remove the glog completely and install it again without having the /bin/bash: ./configure: /bin/sh^M: bad interpreter: No such file or directory as none of the solutions works as mentioned above

推荐答案

为我修复的是删除导出数据文件夹表单 xcode (xcode->preferences->locations),从 ios 中删除 pod 文件夹文件夹,然后运行命令

What fixed it for me was to delete the derived data folder form xcode (xcode->preferences->locations), delete the pod folder from the ios folder and then run the commands

pod cache clean –all,pod repo 更新(如果您使用 pod repo)和吊舱安装

这篇关于React Native glog iOS:未知类型名称'_START_GOOGLE_NAMESPACE_'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-19 00:39