gpt4 book ai didi

ios - 如何在 flutter 中降级包?

转载 作者:行者123 更新时间:2023-11-28 19:25:26 26 4
gpt4 key购买 nike

cloud_firestore 0.12.11 在 flutter 中不适合我,它不允许我的应用程序在调试中启动。我将如何降级这个包?在 pubspec 文件中,我使用了较低版本的 cloud_firestore 即。 (cloud_firestore: ^0.12.9+4) 然后保存,VS Code 得到了包但是当我尝试再次启动时它给出了同样的错误:

                     ~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/kev/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-
0.12.11/ios/Classes/CloudFirestorePlugin.m:157:24: error: no visible @interface for
'FIRQuery' declares the selector 'queryWhereFieldPath:arrayContainsAny:'
query = [query queryWhereFieldPath:fieldPath arrayContainsAny:value];
~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/kev/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-
0.12.11/ios/Classes/CloudFirestorePlugin.m:163:24: error: no visible @interface for
'FIRQuery' declares the selector 'queryWhereField:in:'
query = [query queryWhereField:fieldName in:value];
~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/kev/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-
0.12.11/ios/Classes/CloudFirestorePlugin.m:165:24: error: no visible @interface for
'FIRQuery' declares the selector 'queryWhereFieldPath:in:'
query = [query queryWhereFieldPath:fieldPath in:value];
~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/kev/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-
0.12.11/ios/Classes/CloudFirestorePlugin.m:764:16: warning: 'timestampsInSnapshotsEnabled'
is deprecated [-Wdeprecated-declarations]
settings.timestampsInSnapshotsEnabled =
(bool)call.arguments[@"timestampsInSnapshotsEnabled"];
^
In module 'FirebaseFirestore' imported from

/Users/kev/Documents/flutterprojects/shopapp/ios/Pods/Headers/Public/Firebase/Firebase.h:45:

/Users/kev/Documents/flutterprojects/shopapp/ios/Pods/FirebaseFirestore/Firestore/Source/Public . /FIRFirestoreSettings.h:69:20: note: 'timestampsInSnapshotsEnabled' has been explicitly marked
deprecated here
__attribute__((deprecated));
^
1 warning and 4 errors generated.
note: Using new build systemnote: Planning buildnote: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone X.

当我检查 .pubcache 中的 flutter SDK -> 托管 -> pub.dartlang.org -> 那里有一个文件夹 cloud_firestore 0.12.11 我该如何解决这个问题?当我使用在 pubspec 文件中注释掉的 cloud_firestore 启动时,我的应用程序开始正常运行。

最佳答案

cloud_firestore: ^0.12.9+4

这个名为 caret 的小标志 ^ 用于告诉 pub 获取 版本或更高。要选择特定版本,您需要将其删除。

cloud_firestore: 0.12.9+4

要了解有关依赖项的更多信息,请访问关于 caret syntax 的 Dart 文档和 version constraints .

关于ios - 如何在 flutter 中降级包?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59214312/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com