我有一个使用firebase auth进行身份验证并使用firestore的应用程序,以及下面显示的其他一些依赖项,现在当我将firebase存储添加到下面显示的依赖项时,会出现下面显示的get错误,我应该怎么做才能修复它。
when I add firebase_storage to dependency the below error happens.
[!] CocoaPods could not find compatible versions for pod "Firebase/Firestore":
In snapshot (Podfile.lock):
Firebase/Firestore (= 10.3.0)
In Podfile:
cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) was resolved to 4.4.5, which depends on
Firebase/Firestore (= 10.6.0)
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 `Firebase/Firestore` inside your development pod `cloud_firestore`.
You should run `pod update Firebase/Firestore` to apply changes you've made.
错误:
Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies.
To update the CocoaPods specs, run:
pod repo update
Error running pod install
Error launching application on iPhone 14 Pro Max.
运行pod install时显示此错误
[!] CocoaPods could not find compatible versions for pod "Firebase/Firestore":
In snapshot (Podfile.lock):
Firebase/Firestore (= 10.3.0)
In Podfile:
cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) was resolved to 4.4.5, which depends on
Firebase/Firestore (= 10.6.0)
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 `Firebase/Firestore` inside your development pod `cloud_firestore`.
You should run `pod update Firebase/Firestore` to apply changes you've made.
当运行pod repo update时:
Updating spec repo `trunk`
apple@apples-MacBook-Air ios %
运行应用程序时出现相同错误。
我的pubsec.yaml文件是:
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
flutter_facebook_auth:
shared_preferences: ^2.0.17
flutter_onboard: ^2.0.0
smooth_page_indicator: ^1.0.0+2
flutter_native_splash: ^2.2.17
url_launcher: ^6.1.9
page_transition: "^2.0.9"
permission_handler: ^10.2.0
firebase_auth: any
firebase_core: any
cloud_firestore: any
#####################**SEE HERE!**##################################
#without firebase_storage the app work fine
#but if i add it to here the error is happens
firebase_storage: any
file_picker: ^5.2.6
uuid: ^3.0.6
google_sign_in:
intl_phone_field: ^3.1.0
notification_permissions: ^0.6.1
image_picker:
carousel_slider:
age_calculator:
get:
video_player:
flashy_tab_bar2: ^0.0.6
flutter_platform_widgets: ^3.2.0
2条答案
按热度按时间h5qlskok1#
删除iOS文件夹中的Podfile.lock文件,运行以下命令:
flutter clean
flutter pub get
cd ios
pod deintegrate
pod repo update
pod install
qyyhg6bp2#
版本不匹配也可能导致此问题。