我在react-native-maps中安装google map pod时遇到问题。 没有Google Map,react-native-maps可以正常工作。但是,当我将google map添加到iOS项目时遇到问题。 关注是我的pod文件
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
platform :ios, '10.0'
target 'sa' do
# React Native Maps dependencies
rn_maps_path = '../node_modules/react-native-maps'
pod 'react-native-google-maps', :path => rn_maps_path
pod 'GoogleMaps'
pod 'Google-Maps-iOS-Utils'
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
config = use_native_modules!
use_react_native!(:path => config["reactNativePath"])
target 'saTests' do
inherit! :complete
# Pods for testing
end
end
target 'sa-tvOS' do
# Pods for sa-tvOS
target 'sa-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
当我开始安装pod时,显示以下错误:
JSON::ParserError - 416: unexpected token at '"Example/GoogleMapsDemos/Resources/ne'
以下是我的环境:
CocoaPods : 1.9.3
Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]
RubyGems : 3.0.3
Host : Mac OS X 10.15.6 (19G73)
Xcode : 12.0.1 (12A7300)
Git : git version 2.24.3 (Apple Git-128)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/
希望您能帮上忙。谢谢。
答案 0 :(得分:0)
问题是豆荚。 pod 升级后问题已修复