我有一个flutter项目,使用firebase auth进行登录和注册,我想添加google_mlkit_face_detection来检测图像上的人脸,但google_mlkit_face_detection和firebase_auth在IOS上相互冲突,当运行pod install时显示此错误。
Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies.
要更新CocoaPods规范,请运行:Pod存储库更新
这是孔误差
CocoaPods的输出:准备分析依赖关系检查要集成的目标使用ARCHS
设置构建目标Pods-Runner
的体系结构:(``)Finding Podfile changes A google_mlkit_commons A google_mlkit_face_detection - Flutter - firebase_auth - firebase_core - image_picker_ios - path_provider_foundation Fetching external sources -> Fetching podspec for Flutter
from Flutter
-> Fetching podspec for firebase_auth
from .symlinks/plugins/firebase_auth/ios
firebase_auth:使用'firebase_core'中定义的Firebase SDK版本'10.9.0' -> Fetching podspec for firebase_core
from .symlinks/plugins/firebase_core/ios
firebase_core:使用'firebase_core'中定义的Firebase SDK版本'10.9.0' -> Fetching podspec for google_mlkit_commons
from .symlinks/plugins/google_mlkit_commons/ios
-> Fetching podspec for google_mlkit_face_detection
from .symlinks/plugins/google_mlkit_face_detection/ios
-> Fetching podspec for image_picker_ios
from .symlinks/plugins/image_picker_ios/ios
-> Fetching podspec for path_provider_foundation
from .symlinks/plugins/path_provider_foundation/darwin
解决Podfile
CDN的依赖关系:中继相对路径:CocoaPods-version.yml存在!返回本地,因为仅在repo更新CDN中进行检查:中继相对路径:all_pods_versions_0_3_5.txt存在!返回本地,因为仅在repo更新CDN中进行检查:中继相对路径:Specs/0/3/5/Firebase/10.10.0/Firebase.podspec.json存在!返回本地,因为仅在repo更新CDN中进行检查:中继相对路径:Specs/0/3/5/Firebase/10.9.0/Firebase.podspec.json存在!返回本地,因为仅在repo更新CDN中进行检查:中继相对路径:all_pods_versions_8_1_e.txt存在!返回本地,因为仅在repo更新CDN中进行检查:中继相对路径:Specs/8/1/e/MLKitVision/5.0.0/MLKitVision.podspec.json存在!返回本地,因为仅在repo更新CDN中进行检查:中继相对路径:all_pods_versions_4_2_c.txt存在!返回本地,因为仅在repo更新CDN中进行检查:中继相对路径:Specs/4/2/c/FlutterMacOS/3.0.0/FlutterMacOS.podspec.json存在!返回本地,因为仅在repo更新CDN中进行检查:中继相对路径:Specs/0/3/5/Firebase/10.9.0/Firebase.podspec.json存在!返回本地,因为仅在repo更新CDN中进行检查:中继相对路径:all_pods_versions_b_e_b.txt存在!返回本地,因为仅在repo update 2 CDN中执行检查:中继相对路径:Specs/b/e/b/GoogleMLKit/4.0.0/GoogleMLKit.podspec.json存在!返回本地,因为仅在repo更新CDN中进行检查:中继相对路径:all_pods_versions_6_3_6.txt存在!返回本地,因为仅在repo更新CDN中进行检查:中继相对路径:Specs/6/3/6/FirebaseAuth/10.10.0/FirebaseAuth.podspec.json存在!返回本地,因为检查仅在存储库更新中执行
[!] CocoaPods could not find compatible versions for pod "GTMSessionFetcher/Core":
In snapshot (Podfile.lock):
GTMSessionFetcher/Core (< 4.0, = 3.1.1, >= 2.1)
In Podfile:
firebase_auth (from `.symlinks/plugins/firebase_auth/ios`) was resolved to 4.6.1, which depends on
Firebase/Auth (= 10.9.0) was resolved to 10.9.0, which depends on
FirebaseAuth (~> 10.9.0) was resolved to 10.9.0, which depends on
GTMSessionFetcher/Core (< 4.0, >= 2.1)
google_mlkit_face_detection (from `.symlinks/plugins/google_mlkit_face_detection/ios`) was resolved to 0.7.0, which depends on
GoogleMLKit/FaceDetection (~> 4.0.0) was resolved to 4.0.0, which depends on
GoogleMLKit/MLKitCore (= 4.0.0) was resolved to 4.0.0, which depends on
MLKitCommon (~> 9.0.0) was resolved to 9.0.0, which depends on
GTMSessionFetcher/Core (< 3.0, >= 1.1)
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 `GTMSessionFetcher/Core` inside your development pod `google_mlkit_face_detection`.
You should run `pod update GTMSessionFetcher/Core` to apply changes you've made.
和pubspec.yamel文件
依赖性:
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
firebase_core: any
firebase_auth: any
#google_mlkit_commons: ^0.4.0
google_mlkit_face_detection: any
get: ^4.6.5
get_storage: ^2.1.1
dio: ^5.1.2
image_picker: ^0.8.7
iconly: ^1.0.1
intl: ^0.18.1
age_calculator: ^1.0.0
1条答案
按热度按时间woobm2wo1#
做
pod deintegrate; pod update
FirebaseAuth和MLKit兼容。如果安装了2.x版本的GTMSessionFetcher,则
< 4.0, >= 2.1
与< 3.0, >= 1.1
兼容。问题是已经安装了3.1.1。它需要被删除,然后重新安装pod。