簡體   English   中英

為什么命令“ pod install”或“ pod update pod_name”安裝了這么多文件?

[英]Why does the command `pod install` or `pod update pod_name` install so many files?

我在我的本地ios項目中使用firebase動態鏈接。

Cocoapods version --- 1.5.3 xcode version --- 9.4.1

當我試圖更新莢Firebase/DynamicLinks ,采用pod update Firebase/DynamicLinks ,它更新不僅莢,但這么多的人,最重要的是它不贊成反應v0.11.0,當我做混帳狀態,我看到添加/修改的文件超過1100。

另外,構建失敗,並出現諸如argument list too long類的錯誤。

我不知道為什么這種情況一直伴隨着椰殼蟲發生。

在將segment-io安裝到我的React本機項目中時,我遇到了同樣的問題,因此我不得不手動鏈接該項目。

但是firebase動態鏈接不是javascript庫,因此無需手動鏈接它。

誰能指出解決方案?

之所以這樣,是因為RN podspec很老,而且沒有維護-Facebook不使用cocapods。

要修復它,請將其添加到您的目標(在Podfile )。

pod 'DoubleConversion', :podspec => "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
pod 'Folly', :podspec => "../node_modules/react-native/third-party-podspecs/Folly.podspec"
pod 'glog', :podspec => "../node_modules/react-native/third-party-podspecs/GLog.podspec"
pod 'React', path: '../node_modules/react-native', subspecs: [
  'Core',
  'CxxBridge',
  'RCTAnimation',
  'RCTActionSheet',
  'RCTImage',
  'RCTLinkingIOS',
  'RCTNetwork',
  'RCTSettings',
  'RCTText',
  'RCTVibration',
  'RCTWebSocket',
  'RCTPushNotification',
  'RCTCameraRoll',
  'RCTSettings',
  'RCTBlob',
  'RCTGeolocation',
  'DevSupport'
]
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

這將告訴cocoapods使用來自node_nodules react本機庫和其他所需庫-帶有package.json定義的版本

Podfile腳本廣告底部( Podfile目標之后):

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

有計划在將來進行改進: https : //github.com/react-native-community/discussions-and-proposals/pull/18

當我嘗試使用吊艙更新Firebase / DynamicLinks更新吊艙Firebase / DynamicLinks時,它不僅會更新該吊艙,還會更新許多其他吊艙...

基本上,發生這種情況是因為Firebase/DynamicLinks 依賴於其他存儲庫(pod),這意味着為了更新Firebase/DynamicLinks ,還應該更新它們的依賴關系。

作為建議,您應該-手動-提及適合您項目的最新版本; 在您的podfile

pod `Firebase/DynamicLinks`, 'here is the specific proper version'

請注意,在未提及Pod的使用版本的情況下,它應安裝最新版本,這可能適合您的情況。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM