当更新Firebase_AdMob到firebase_admob: ^0.11.0+1的最新版本时,我的Ffltter应用程序已经停止工作,可能它在FireBase的软件包之间有冲突.我正在try 为iOS构建一款应用程序,但由于CocoaPods,Flutter 运行失败了:

我正在把firebase系列的两个软件包更新到最新版本.

firebase_admob: ^0.11.0+1
firebase_crashlytics: ^0.4.0+1

这是pod install --repo-update的输出

Updating local specs repositories

CocoaPods 1.10.1 is available.
To update use: `sudo gem install cocoapods`

For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.10.1

Analyzing dependencies
firebase_core: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
firebase_crashlytics: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
[!] CocoaPods could not find compatible versions for pod "firebase_admob":
  In Podfile:
    firebase_admob (from `.symlinks/plugins/firebase_admob/ios`)

Specs satisfying the `firebase_admob (from `.symlinks/plugins/firebase_admob/ios`)` dependency were found, but they required a higher minimum deployment target.

[!] Automatically assigning platform `iOS` with version `9.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.

我的iOS设备有一些问题,而它在安卓系统上运行得很好.我在pod安装上出错了

我用Flutter 开发主频道试过了,也有同样的问题.我目前正在使用MASTER.我try 删除我的Pods文件夹并重新运行Pod安装,但对任何人都不起作用

这是1flutter doctor -v的yields

[✓] Flutter (Channel stable, 1.22.5, on Mac OS X 10.15.7 19H2 darwin-x64, locale en-GB)
    • Flutter version 1.22.5 at /Users/mac/Development/flutter
    • Framework revision 7891006299 (7 weeks ago), 2020-12-10 11:54:40 -0800
    • Engine revision ae90085a84
    • Dart version 2.10.4

 
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/mac/Library/Android/sdk
    • Platform android-30, build-tools 30.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.0, Build version 12A7209
    • CocoaPods version 1.10.0

[!] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] Connected device (1 available)
    • Paresh’s iPhone (mobile) • 49f62dac6f1da634e5d71981db4d591dc9126e4b • ios • iOS 13.3

! Doctor found issues in 1 category.

推荐答案

To fix CocoaPods compatible versions

使用较新版本的FireBase时,有时需要手动运行Pod更新程序,之后通常会找到需要构建的所有内容.

要解决此问题,请执行以下命令

  1. 转到Your_Project_Directory/ios/美元
  2. pod repo update
  3. rm -f Podfile.lock
  4. pod update
  5. pod install
  6. 运行flutter run分钟

To fix required a higher minimum deployment target

您只需将Xcode中的iOS目标更新为至少10.0.这就是所有FlutterFire包中版本 skip 的原因.Firebase AdMob在最新版本上运行良好.

突破专长:将端口转发到Firebase-iOS-SDK v7.3.0.

  • 由于此次SDK升级,iOS 10现在是FlutterFire支持的最低版本.请更新您的生成目标版本.

要解决此问题,请增加您的目标版本iOS目标.要更改您的

go 你的Flutter 项目.导航到ios并打开Podfile文件,并用以下内容替换该文件的第二行:

platform :ios, '12.0'platform :ios, '10.0’,随您喜欢>;10

Flutter相关问答推荐

当MyChangeNotifier更改时如何计算函数,而无需在构建方法中进行不必要的调用- Flutter

当仅点击一行时,所有行都被选中

如何防止alert 对话框在收到通知时出现在某个flutter页面中

Flutter Go路由深度链接不按预期工作

为什么Riverpod生成器在这种情况下不生成AsyncNotiator?

如何在扩展其他小部件时访问Ref

我不能在Fighting中裁剪图片输入错误,否则应用程序会崩溃

为什么在setState之后Ffltter Pageview重置为第0页

Flutter :URI的目标不存在

Flutter为什么不;没有ListView.iterable()构造函数?

当 Dart SDK 版本范围不匹配时,为什么依赖解析器不会抛出错误?

在 Flutter 中滑动关闭 PageView.builder 时出现问题

如何给按钮的边框半径?

无法在 ListView (Flutter) 中限制 Card 的最大宽度

有没有办法在没有收缩包装的情况下在列中使用 ListView.Builder?

Flutterfire Configure - 未处理的异常和没有 firebase 初始化

Flutter 活跃的互联网连接

如何使按钮被选中?

是否可以在 Flutter 中使用 ToggleButtons 在页面 PageView 之间切换?

如何在 Flutter 中的页面加载上的 Listview 上应用自动滚动