【问题标题】:Can't install google map pod in react-native-map无法在 react-native-map 中安装 google map pod
【发布时间】:2023-03-06 04:52:01
【问题描述】:

我在 react-native-maps 中安装 google map pod 时遇到问题。 react-native-maps 在没有谷歌地图的情况下运行良好。但是当我将谷歌地图添加到 iOS 项目时,我遇到了一个问题。 Follow 是我的 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 install 时,显示以下错误:

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/

我希望你的帮助。谢谢。

【问题讨论】:

    标签: react-native google-maps cocoapods react-native-ios react-native-maps


    【解决方案1】:

    问题是吊舱。 pod 升级后问题已修复

    【讨论】:

      猜你喜欢
      • 2022-10-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-11-17
      • 2018-06-14
      • 2019-06-07
      • 2019-11-10
      • 1970-01-01
      相关资源
      最近更新 更多