Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/222.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 如何解决;未找到config.h文件";?从设备上的react本机运行应用程序时?_Android_Ios_Github_React Native_React Native Ios - Fatal编程技术网

Android 如何解决;未找到config.h文件";?从设备上的react本机运行应用程序时?

Android 如何解决;未找到config.h文件";?从设备上的react本机运行应用程序时?,android,ios,github,react-native,react-native-ios,Android,Ios,Github,React Native,React Native Ios,获取错误“未找到Config.h文件,词法或预处理器错误。” 我正在xcode项目的设备中运行应用程序 我在谷歌上找到了很多解决方案,但都没用,我试过这个 当我尝试在iOS模拟器中运行时,得到了这个错误 尝试跟踪上述url,但未成功 请让我知道如何解决这个问题。 谢谢只需打开config.h文件,单击右侧面板并通过检查正确的大小写将该文件添加到应用程序目标。清理并重新编译。我遇到了同样的问题,这些命令解决了这个问题:- 纱线 npm 试试看 Open Terminal, go to your

获取错误“未找到Config.h文件,词法或预处理器错误。”

我正在xcode项目的设备中运行应用程序

我在谷歌上找到了很多解决方案,但都没用,我试过这个

当我尝试在iOS模拟器中运行时,得到了这个错误

尝试跟踪上述url,但未成功

请让我知道如何解决这个问题。
谢谢

只需打开config.h文件,单击右侧面板并通过检查正确的大小写将该文件添加到应用程序目标。清理并重新编译。

我遇到了同样的问题,这些命令解决了这个问题:-

纱线

npm


试试看

Open Terminal, go to your project’s root folder and do:
cd node_modules/react-native/third-party/glog-0.3.4/
运行配置脚本: /配置 打开Xcode并尝试运行您的应用程序

Xcode 10

"react-native": "0.57.5"

cd ./node_modules/react-native && scripts/ios-install-third-party.sh && cd third-party && cd $(ls | grep 'glog' | awk '{print $1}') && ./configure
对我来说:

# rm -rf  node_modules

# npm cache verify  (Because I'm using npm version 5.0.3)

# npm install

Xcode Clean

Xcode Run
如果这不起作用

在终端中,导航到
node\u模块内的
react native/third-party/glog文件夹

(对我来说,这是
cd node_modules/react native/third-party/glog-0.3.4

一旦在该文件夹中处于活动状态

#run ../../scripts/ios-configure-glog.sh

配置Glog,并创建所需的
config.h
头文件,以便
Xcode
查找删除节点模块/react本机文件夹中的第三方文件夹。

这解决了我的问题。但是,我必须使用
纱线缓存清理
。不过,我可能使用了不同版本的Thread。请小心使用Thread clean:
注意:此命令仅适用于高级用例。除非您遇到作为node_模块一部分安装的文件量问题,否则不建议使用此命令。它使用启发式方法来识别分布式软件包中可能不需要且可能不完全安全的文件。
请删除android标记,我在谷歌搜索结果中几乎忽略了这一点,因为它有一个
android-
前缀。我遇到了一个新错误:在signalhandler.cc的“\uuuu darwin\u arm\u thread\u state64”中没有名为“\uu rip”的成员
# rm -rf  node_modules

# npm cache verify  (Because I'm using npm version 5.0.3)

# npm install

Xcode Clean

Xcode Run
#run ../../scripts/ios-configure-glog.sh