无法在CocoaPods中安装React子规格

时间:2019-05-08 20:46:12

标签: ios react-native cocoapods

这是我当前的Podfile:

"[^'""]*"

当我尝试添加此内容时:

>MannKendall(PrecipGL)
tau = 0.265, 2-sided pvalue =0.00029206

>tidy(MannKendall(PrecipGL))
# A tibble: 1 x 5
statistic  p.value kendall_score denominator var_kendall_score
 1     0.265 0.000292           989       3738.            74398.

我收到此错误:

# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'

target 'atom' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  pod 'Firebase/Core', '~> 5.20.1'
  pod 'Firebase/Firestore', '~> 5.20.1'
  pod 'Firebase/Auth', '~> 5.20.1'
  pod 'Firebase/Storage', '~> 5.20.1'
  pod 'Firebase/Database', '~> 5.20.1'
  pod 'Firebase/Messaging', '~> 5.20.1'
  pod 'Firebase/Functions', '~> 5.20.1'
  pod 'Firebase/DynamicLinks', '~> 5.20.1'
  pod 'Firebase/Performance', '~> 5.20.1'



  pod 'react-native-image-picker', :path => '../node_modules/react-native-image-picker'
  pod 'react-native-maps', :path => '../node_modules/react-native-maps'

end



 post_install do |installer|
   installer.pods_project.targets.each do |target|
     if target.name == "React"
       target.remove_from_project
     end
   end
 end

我尝试过 pod 'React', :path => '../node_modules/react-native', :subspecs => [ 'RCTGeolocation', ] ,但仍然会发生错误。

我在React-native 0.59上。部署目标9.0。

2 个答案:

答案 0 :(得分:0)

我在0.60版中遇到了同样的问题。我发现地理位置已移出反应本地核。

通过将其作为单独的模块进行修复。

react-native-geolocation上的安装说明和文档。

P.S。毕竟需要导入!

答案 1 :(得分:0)

首先,<= 0.59和> = 0.60使用完全不同的pod文件,因为核心已移至pod进行依赖。

这是0.59及以下版本:

    pod 'React', :path => '../node_modules/react-native', :subspecs => [
    'Core',
    'ART',
    'CxxBridge', # Include this for RN >= 0.47
    'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43
    'RCTNetwork',
    'RCTText',
    'RCTWebSocket', # Needed for debugging
    'RCTAnimation', # Needed for FlatList and animations running on native UI thread
    'RCTGeolocation', 
    'RCTImage',
    'RCTBlob',
    'RCTActionSheet',
    'RCTSettings',
    'RCTVibration',
    'RCTPushNotification',
    'RCTLinkingIOS'

    # Add any other subspecs you want to use in your project
  ]

pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

别忘了包括瑜伽,否则您将得到一个错误。