CocoaPods 在 ios 目录中找不到 pod“FBSDKLoginKit”的兼容版本

Aim*_*bol 20 flutter flutter-dependencies

我有 flutter 应用程序,运行命令时出现以下错误:\npod install --repo-update

\n

这是我收到的错误:

\n
[!] CocoaPods could not find compatible versions for pod "FBSDKLoginKit":\n  In Podfile:\n    flutter_facebook_auth (from `.symlinks/plugins/flutter_facebook_auth/ios`) was resolved to 4.3.0, which depends on\n      FBSDKLoginKit (~> 13)\n\n    flutter_login_facebook (from `.symlinks/plugins/flutter_login_facebook/ios`) was resolved to 1.4.0, which depends on\n      FBSDKLoginKit (~> 12.3)\n
Run Code Online (Sandbox Code Playgroud)\n

在我升级到最新的 flutter 软件包后,开始出现错误。\n这是我在 pubspeck.yaml 中使用的软件包:

\n
dependencies:\n  badges: ^2.0.1\n  cached_network_image: ^3.2.0\n  carousel_slider: ^4.0.0\n  cloud_firestore: ^3.1.0\n  cloud_functions: ^3.1.0\n  connectivity_plus: ^2.0.2\n  cupertino_icons: ^1.0.3\n  device_info_plus: ^3.2.2\n  dotted_border: ^2.0.0+2\n  firebase_analytics: ^8.3.4\n  firebase_auth: ^3.2.0\n  firebase_core: ^1.10.0\n  firebase_crashlytics: ^2.3.0\n  firebase_dynamic_links: ^4.0.6\n  firebase_in_app_messaging: ^0.5.0+14\n  firebase_messaging: ^11.1.0\n  firebase_storage: ^10.1.0\n  flash: ^2.0.3\n  flutter:\n    sdk: flutter\n  flutter_hooks: ^0.18.0\n  flutter_image_compress: ^1.1.0\n  flutter_launcher_icons: ^0.9.2\n  flutter_local_notifications: ^9.4.0\n  flutter_login_facebook: ^1.2.0\n  flutter_markdown: ^0.6.8\n  flutter_slidable: ^0.6.0\n  flutter_svg: ^1.0.3\n  flutterfire_ui: ^0.3.4\n  freezed_annotation: ^1.1.0\n  geocoding: ^2.0.4\n  geolocator: ^8.2.0\n  google_fonts: ^2.1.0\n  google_sign_in: ^5.2.1\n  hive: ^2.0.4\n  hive_flutter: ^1.1.0\n  hooks_riverpod: ^1.0.0\n  http: ^0.13.4\n  image_cropper: ^1.4.1\n  image_picker: ^0.8.4+4\n  linkable: ^3.0.1\n  material_design_icons_flutter: ^5.0.6295\n  open_mail_app: ^0.4.5\n  path_provider: ^2.0.9\n  package_info_plus: ^1.3.0\n  pattern_formatter: ^2.0.0\n  permission_handler: ^8.2.6\n  photo_view: ^0.13.0\n  purchases_flutter: ^3.5.0\n  rate_my_app: ^1.1.1+1\n  share: ^2.0.4\n  shared_preferences: ^2.0.8\n  shimmer: ^2.0.0\n  timeago: ^3.1.0\n  tuple: ^2.0.0\n  url_launcher: ^6.0.20\n  uuid: ^3.0.5\n  webview_flutter: ^3.0.0\n\ndev_dependencies:\n  flutter_test:\n    sdk: flutter\n  mockito: ^5.1.0\n
Run Code Online (Sandbox Code Playgroud)\n

我尝试了以下操作:

\n
    \n
  • 删除Podfile.lock
  • \n
  • 跑得干净
  • \n
  • 在 Podfile 里面我有(平台:ios,'11.0')
  • \n
\n

提前感谢您的帮助。

\n

这是我运行 flutter doctor 时得到的结果

\n
Doctor summary (to see all details, run flutter doctor -v):\n[\xe2\x9c\x93] Flutter (Channel stable, 2.10.5, on macOS 12.3.1 21E258 darwin-x64, locale en-AE)\n[\xe2\x9c\x93] Android toolchain - develop for Android devices (Android SDK version 30.0.2)\n[\xe2\x9c\x93] Xcode - develop for iOS and macOS (Xcode 13.3.1)\n[\xe2\x9c\x93] Chrome - develop for the web\n[\xe2\x9c\x93] Android Studio (version 4.2)\n[\xe2\x9c\x93] VS Code (version 1.67.1)\n[\xe2\x9c\x93] Connected device (2 available)\n[\xe2\x9c\x93] HTTP Host Availability\n
Run Code Online (Sandbox Code Playgroud)\n

小智 21

只需删除您的 ios 工作区、pods 文件和 pod.lock 然后,更改 podfile 中的平台:ios, '12.0'

执行 pod install 并运行项目后,它对我有用

  • 只需更改为 12.0 就可以了。 (11认同)

Aim*_*bol 3

这是我如何根据“darwin-morocho /flutter-facebook-auth”的建议解决问题的方法

您必须从 pubspec.yaml 中删除 flutter_login_facebook,flutter_facebook_auth 也必须位于您的依赖项中