gpt4 book ai didi

ios - Flutter iOS版本因Pod文件: Podfile is out of date错误而失败

转载 作者:行者123 更新时间:2023-12-02 10:40:09 27 4
gpt4 key购买 nike

我正在尝试在ios模拟器(ios 13)上构建我的应用程序,但是构建失败并给出Pod文件错误:Podfile已过期
这是错误。

Launching lib/main.dart on iPhone 11 Pro Max in debug mode...
Warning: Podfile is out of date
This can cause a mismatched version of Flutter to be embedded in your app, which may result in App Store submission rejection or crashes.
If you have local Podfile edits you would like to keep, see https://github.com/flutter/flutter/issues/24641 for instructions.
To regenerate the Podfile, run:
rm ios/Podfile

Warning: Podfile is out of date
This can cause issues if your application depends on plugins that do not support iOS.
See https://flutter.dev/docs/development/packages-and-plugins/developing-packages#plugin-platforms for details.
If you have local Podfile edits you would like to keep, see https://github.com/flutter/flutter/issues/45197 for instructions.
To regenerate the Podfile, run:
rm ios/Podfile

Running Xcode build...
Xcode build done. 7,8s
Failed to build iOS app
Error output from Xcode build:

** BUILD FAILED **


Xcode's output:

/Users/kareldebedts/developer/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.12.11/ios/Classes/CloudFirestorePlugin.m:155:24: error: no visible @interface for 'FIRQuery' declares the selector 'queryWhereField:arrayContainsAny:'
query = [query queryWhereField:fieldName arrayContainsAny:value];
~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/kareldebedts/developer/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/kareldebedts/developer/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/kareldebedts/developer/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/kareldebedts/developer/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/kareldebedts/DRINKM8/drinkm8_git/ios/Pods/Headers/Public/Firebase/Firebase.h:31:
/Users/kareldebedts/DRINKM8/drinkm8_git/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.

Could not build the application for the simulator.
Error launching application on iPhone 11 Pro Max.
我尝试了rm ios/Podfile,但是终端说命令不存在...
这是我的pubspec yaml。
dependencies:
flutter:
sdk: flutter

cupertino_icons: ^0.1.2
firebase_core: ^0.4.0
firebase_auth: ^0.11.1+12
flutter_facebook_login: ^2.0.1
cloud_firestore: ^0.12.7+1
shared_preferences: ^0.5.3+4
geolocator: ^5.1.1+1
url_launcher: ^5.1.2
rflutter_alert: ^1.0.3
font_awesome_flutter: ^8.5.0
flutter_picker: ^1.0.13
uuid: 2.0.1
image_picker: ^0.6.1
path_provider: ^1.2.0
image: ^2.1.4
firebase_storage: ^3.0.4
flutter_datetime_picker: ^1.2.5
intl: ^0.15.8
native_contact_picker: ^0.0.6
flutter_spinkit: ^4.0.0
transparent_image: ^1.0.0
connectivity: ^0.4.3+7
flare_splash_screen: ^2.1.3
algolia: ^0.1.6+1
http: ^0.12.0+2
cloud_functions: ^0.4.1+6
firebase_messaging: ^5.0.2
avatar_glow: ^1.0.0
google_maps_flutter: ^0.5.21+8
geoflutterfire: ^2.0.2
rxdart: ^0.22.2
auto_size_text: ^2.1.0
camera: ^0.5.4+1
video_player: ^0.10.2+1
story_view: ^0.11.0
thumbnails: ^1.0.1
image_crop: ^0.3.1
file_picker: ^1.4.2
pdf_viewer_plugin: ^1.0.0+2
flutter_background_geolocation: ^1.3.2
location_permissions: ^2.0.3
image_downloader: ^0.19.1
permission_handler: ^3.3.0
firebase_database: ^3.1.0
有人知道什么会导致问题吗?
也许是因为我将模拟器升级到了IOS 13 ...
提前致谢!

最佳答案

这在大多数情况下都会在我更新flutter SDK时发生,但是请不要跳过更新以使其变得更好,更容易,因为它很容易解决
必须修复-删除Pods文件夹中的内容将解决此问题,这是执行此操作的过程

  • 要完全清理(删除链接的所有点)并创建升级到新版本(也要卸载并再次安装),请编写以下命令
    flutter clean
    rm -Rf ios/Pods
    rm -Rf ios/.symlinks
    rm -Rf ios/Flutter/Flutter.framework
    rm -Rf ios/Flutter/Flutter.podspec
  • 然后,要重现Podfile,请遵循以下命令
    rm ios/Podfile
  • 最后,您的项目已准备就绪,可以继续进行
    flutter run
  • 关于ios - Flutter iOS版本因Pod文件: Podfile is out of date错误而失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59362862/

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