反应本机“找不到'AIRMapCoordinate.h'文件”错误

时间:2020-04-15 03:32:49

标签: ios xcode react-native react-native-maps

我遇到了Xcode的问题。我为我的本机项目升级了一个程序包(react-native-track-player@2.0.0-rc13),之后,当我尝试构建该项目时,“ react-native- maps@0.26.1“套件。它显示此错误:

'AIRMapCoordinate.h' file not found

我意识到发生此错误是因为Xcode找不到这些标头,并且这些标头在此目录中: $(SRCROOT)/../ node_modules / react-native-maps / lib / ios / AirMaps

因此我将此路径添加到“标题搜索路径”,但仍然找不到那些标题。我还删除了pod并重新安装它们并清理了项目的构建文件夹,但仍然存在相同的问题。 您对这里出什么问题有任何想法吗?

1 个答案:

答案 0 :(得分:0)

对我来说也是一样,即使设置了标题搜索路径后问题仍然存在。

修复:

移动pod 'react-native-google-maps', path: rn_maps_path 上方 use_native_modules

(以前低于那个)在 Podfile 中

  rn_maps_path = '../node_modules/react-native-maps';
  
  pod 'react-native-google-maps', path: rn_maps_path
  pod 'GoogleMaps'
  pod 'GooglePlaces'
  pod 'Google-Maps-iOS-Utils'

  config = use_native_modules! //<--- this should be below the rn-maps pod

相关问题:

RCTConvert+AirMap.h file not found Error on React Native on IOS