ios - RCTConvert+AirMap.h 文件在 IOS 上的 React Native 上找不到错误
解决方案
最近更新
对于类似或最新的配置
"react": "17.0.1",
"react-native": "0.64.2",
"react-native-cli": "^2.0.1",
"react-native-maps": "^0.28.0",
使用 GoogleMap 和其他地图提供者配置 React Native Maps 非常容易。
自动链接并不能解决问题,因此您必须手动判断xcode
本机代码的位置。有2种方式告诉
- 在此处使用这些说明手动将文件/文件夹添加到 Xcode
- 最简单的。无需转到
Xcode
进行调整header search path
2.最简单的
# Podfile
pod 'react-native-google-maps', :path => '../../../node_modules/react-native-maps/'
pod 'react-native-maps', :path => '../../../node_modules/react-native-maps/'
# These might not be necessary
# Please build without these. If could not build, add these as well
pod 'GoogleMaps'
pod 'Google-Maps-iOS-Utils'
在AppDelegate.m
文件中
#import <FlipperKitReactPlugin/FlipperKitReactPlugin.h> // this line is alreaady there. Add the line below
#import <GoogleMaps/GoogleMaps.h>
...
...
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions // this line is alreaady there. Add the line below
{
+ [GMSServices provideAPIKey:@"AIzaEEBBLn-PhCDDD1AnC_h66yH8LEEUkd14WW0"]; // add this line using the api key obtained from Google Console
笔记:
- 从谷歌控制台替换
AIzaEEBBLn-PhCDDD1AnC_h66yH8LEEUkd14WW0
为您自己的 API 密钥。 - 就我而言,我正在使用 monorepo 技术
'../../../node_modules/react-native-maps/'
。在你的情况下'../node_modules/react-native-maps/'
+
并且-
应该使用标志。它们是语言定义的实体。没有类型错误
推荐阅读
- python - 如何在 QGraphicsView 中制作 2 层?
- c# - DocuSign:更新信封时签名者选项卡丢失
- ruby-on-rails - 捆绑器:不可执行:无论何时使用 gem,rails 生产中的 bin/rails
- php - 使用角度上传视频
- ajax - Ajax 调用总是返回一个空对象
- ssas - “内部错误:发生意外异常。” 在多维模型中过滤具有参差不齐的父子层次结构的简单维度时
- postgresql - Intellij Jpa 控制台数据库架构
- python - 要求用户在结帐前先完成个人资料信息
- javascript - 我正在努力在一个对象中展平两个数组
- sql - 单个sql查询中的最小值和最大值