Moa*_*waf 2 ios dart flutter flutter-build flutter-ios-build
我一直在为使用 的 Flutter 应用程序进行更新Firebase Firestore
,一旦我完成更新并开始为 IOS 构建它,我收到以下错误消息,导致构建操作失败:
[!] CocoaPods could not find compatible versions for pod "Firebase/Auth":
In snapshot (Podfile.lock):
Firebase/Auth (= 9.3.0)
In Podfile:
firebase_auth (from `.symlinks/plugins/firebase_auth/ios`) was resolved to 3.3.12, which depends on Firebase/Auth (= 8.14.0)
Run Code Online (Sandbox Code Playgroud)
注意:问题中的错误消息说是Firebase/Auth
package,但其他包也发生过这种情况Firebase
。
那么我应该怎么做才能克服这个问题呢?
既然您提到您正在Firebase Firestore
应用程序中使用,那么您的情况可能与我的情况相同。
在Flutter的官方文档中,您会注意到一个可选步骤,告诉您在 中添加一行,通过包含预编译框架来提高 iOS 和 macOS 的构建时间,如下所示:Firebase Firestore
Podfile
target 'Runner' do
...
# This is the mentioned line
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '8.15.0'
...
end
Run Code Online (Sandbox Code Playgroud)
我的解决方案是将tag
行中链接中的数字更新为GitHub 上存储库中的最新数字。哪个回购?队列中的那个。
在允许您选择 的下拉列表中,branch
您将找到一个用于选择 的选项卡tag
,只需点击它并检查最新版本号并在行中使用它,例如,此答案时的最新版本是9.3.0
,因此该行将是:
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '9.3.0'
Run Code Online (Sandbox Code Playgroud)
如果它不起作用,那么您可以完全忽略此可选步骤并从Podfile
. 构建操作将比以前花费更长的时间,但这比构建失败要好。
归档时间: |
|
查看次数: |
7323 次 |
最近记录: |