Flutter - 更新 pod 依赖循环

问题描述 投票:0回答:1

我不知道使用什么命令来摆脱这种情况,我似乎有一个 pod 依赖循环,禁止我更新 pod 版本? 如何清理整个项目并更新,或者除了

flutter pub upgrade
flutter pub upgrade --major-versions
之外还有其他命令吗?

根据 Flutter GoogleMaps 项目,我至少应该达到

v9.0.0
或更新

我尝试在 podfile 中将 ios 版本提高到 15,因为一些消息来源表明 bc 9.0.0 仅适用于 15 以上,但我仍然坚持使用原来的软件包版本。我正在寻找如何升级软件包版本...

$ flutter pub outdated
Changing current working directory to: /Users/YOU/Documents/app
Showing outdated packages.
[*] indicates versions that are not the latest available.

Package Name                  Current  Upgradable  Resolvable  Latest  

direct dependencies: all up-to-date.

dev_dependencies: all up-to-date.

transitive dependencies:     
async                         *2.11.0  *2.11.0     *2.11.0     2.12.0  
characters                    *1.3.0   *1.3.0      *1.3.0      1.3.1   
collection                    *1.18.0  *1.18.0     *1.18.0     1.19.0  
http_parser                   *4.0.2   *4.0.2      *4.0.2      4.1.0   
material_color_utilities      *0.11.1  *0.11.1     *0.11.1     0.12.0  
meta                          *1.15.0  *1.15.0     *1.15.0     1.16.0  
string_scanner                *1.2.0   *1.2.0      *1.2.0      1.3.0   
webview_flutter               *4.9.0   *4.9.0      *4.9.0      4.10.0  
webview_flutter_android       *3.16.9  *3.16.9     *3.16.9     4.0.0   

transitive dev_dependencies: 
leak_tracker                  *10.0.5  *10.0.5     *10.0.5     10.0.7  
leak_tracker_flutter_testing  *3.0.5   *3.0.5      *3.0.5      3.0.8   
lints                         *5.0.0   *5.0.0      *5.0.0      5.1.0   
stack_trace                   *1.11.1  *1.11.1     *1.11.1     1.12.0  
test_api                      *0.7.2   *0.7.2      *0.7.2      0.7.3   
vm_service                    *14.2.5  *14.2.5     *14.2.5     14.3.0  
all dependencies are up-to-date.

$ pod install
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "GoogleMaps":
  In snapshot (Podfile.lock):
    GoogleMaps (< 8.0, = 7.4.0)

  In Podfile:
    google_maps_flutter_ios (from `.symlinks/plugins/google_maps_flutter_ios/ios`) was resolved to 0.0.1, which depends on
      GoogleMaps (< 10.0, >= 8.4)


You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * changed the constraints of dependency `GoogleMaps` inside your development pod `google_maps_flutter_ios`.
   You should run `pod update GoogleMaps` to apply changes you've made.

使用下一个命令,循环开始

$pod update GoogleMaps
Updating local specs repositories
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "Google-Mobile-Ads-SDK":
  In snapshot (Podfile.lock):
    Google-Mobile-Ads-SDK (= 10.11.0, ~> 10.11.0)

  In Podfile:
    google_mobile_ads (from `.symlinks/plugins/google_mobile_ads/ios`) was resolved to 5.2.0, which depends on
      Google-Mobile-Ads-SDK (~> 11.10.0)


You have either:
 * changed the constraints of dependency `Google-Mobile-Ads-SDK` inside your development pod `google_mobile_ads`.
   You should run `pod update Google-Mobile-Ads-SDK` to apply changes you've made.

并且

$pod update Google-Mobile-Ads-SDK
Updating local specs repositories
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "GoogleMaps":
  In snapshot (Podfile.lock):
    GoogleMaps (< 8.0, = 7.4.0)

  In Podfile:
    google_maps_flutter_ios (from `.symlinks/plugins/google_maps_flutter_ios/ios`) was resolved to 0.0.1, which depends on
      GoogleMaps (< 10.0, >= 8.4)


You have either:
 * changed the constraints of dependency `GoogleMaps` inside your development pod `google_maps_flutter_ios`.
   You should run `pod update GoogleMaps` to apply changes you've made.
ios flutter cocoapods
1个回答
0
投票

这是解决问题的命令

flutter clean
rm ios/Podfile.lock 
flutter pub get 
cd ios 
pod install --repo-update
© www.soinside.com 2019 - 2024. All rights reserved.