满足"firebase_admob"的规范,但在Flutter中需要更高的最低部署目标 [英] Specs satisfying the 'firebase_admob', but they required a higher minimum deployment target in Flutter

查看:136
本文介绍了满足"firebase_admob"的规范,但在Flutter中需要更高的最低部署目标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当使用 firebase_admob:^ 0.11.0 + 1 将firebase_admob更新到最新版本时,我的Flutter应用已停止工作,也许在firebase软件包之间存在冲突.我正在尝试为iOS开发一个应用程序,但是由于cocoapods的原因导致运行不顺畅:

我正在将Firebase系列的两个软件包更新为最新版本.我正在使用的软件包:

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

这是 pod install --repo-update

的输出

 更新本地规格存储库CocoaPods 1.10.1可用.更新使用:`sudo gem install cocoapods`有关更多信息,请参见https://blog.cocoapods.org和此版本的CHANGELOG,网址为https://github.com/CocoaPods/CocoaPods/releases/tag/1.10.1分析依赖关系firebase_core:使用在"firebase_core"中定义的Firebase SDK版本"7.3.0"firebase_crashlytics:使用在"firebase_core"中定义的Firebase SDK版本"7.3.0"[!] CocoaPods找不到Pod"firebase_admob"的兼容版本:在Podfile中:firebase_admob(来自`.symlinks/plugins/firebase_admob/ios`)找到了满足firebase_admob(来自于.symlinks/plugins/firebase_admob/ios)的规范,但是它们需要更高的最低部署目标.[!]因为未指定平台,所以在目标`Runner'上自动为平台`iOS`分配了版本9.0.请在您的Podfile中为此目标指定一个平台.参见`https://guides.cocoapods.org/syntax/podfile.html#platform`. 

我的iOS设备上存在一些问题,尽管它在android上运行正常.我在Pod安装上遇到错误

我已经使用flutter dev&主频道也有同样的问题.我目前正在使用主人.我尝试删除我的Pods文件夹并重新运行Pod安装,但是任何人都无法使用

这是Flutter Doctor -v

的输出

  [✓] Flutter(频道稳定,1.22.5,在Mac OS X 10.15.7 19H2 darwin-x64上,语言环境为en-GB)•/Users/mac/Development/flutter中的Flutter 1.22.5版•Framework修订版7891006299(7周前),2020-12-10 11:54:40 -0800•发动机版本AE90085A84•Dart版本2.10.4[✓] Android工具链-为Android设备开发(Android SDK版本30.0.3)•位于/Users/mac/Library/Android/sdk的Android SDK•平台android-30,构建工具30.0.3•Java二进制文件,位于:/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java•Java版本OpenJDK运行时环境(内部版本1.8.0_242-release-1644-b3-6915495)•接受所有Android许可.[✓] Xcode-为iOS和macOS开发(Xcode 12.0)•Xcode位于/Applications/Xcode.app/Contents/Developer•Xcode 12.0,内部版本12A7209•CocoaPods版本1.10.0[!] Android Studio(4.1版)•位于/Applications/Android Studio.app/Contents的Android Studiotter未安装Flutter插件;这增加了Flutter的特定功能.art未安装Dart插件;这增加了Dart特定的功能.•Java版本OpenJDK运行时环境(内部版本1.8.0_242-release-1644-b3-6915495)[✓]已连接的设备(1个可用)•Paresh的iPhone(移动电话)•49f62dac6f1da634e5d71981db4d591dc9126e4b•ios•iOS 13.3!医生发现了1类问题. 

解决方案

修复CocoaPods兼容版本

使用较新版本的Firebase有时需要手动运行pod更新,此后通常会找到它需要构建的所有内容.

要解决此问题,请遵循以下命令

  1. 转到 Your_Project_Directory/ios/
  2. pod仓库更新
  3. rm -rf Podfile.lock
  4. pod更新
  5. pod安装
  6. 运行 flutter运行

要修复,需要更高的最低部署目标

您只需要将Xcode中的iOS目标至少更新为 10.0 .这就是所有FlutterFire软件包中的版本增加的原因.Firebase admob可以在最新版本上正常工作.

BREAKING FEAT:将端口转发到firebase-ios-sdk v7.3.0.

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

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

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

platform:ios,'12 .0' platform:ios,'10 .0'

My Flutter app has stopped working when updated firebase_admob to the newest version with firebase_admob: ^0.11.0+1, maybe it has a conflict between a package of the firebase. I'm trying to build an app for iOS but the flutter run fails because of cocoapods:

I'm just updating two packages of the firebase family to the newest version. The package I'm using:

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

This is the output of 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`.

I have some problems on my iOS device, while it's working perfectly on android. I'm getting an error on pod install

I've tried this using the flutter dev & master channel and have the same issue. I'm currently using master. I've tried removing my Pods folder and re-running pod install but not working anyone

This is the output of flutter doctor -v

[✓] 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

With the newer version of firebase sometimes need to run pod update manually, after that it generally found everything it needs to build.

To solve this issue follow the below command

  1. Go to Your_Project_Directory/ios/
  2. pod repo update
  3. rm -rf Podfile.lock
  4. pod update
  5. pod install
  6. run flutter run

To fix required a higher minimum deployment target

You just need to update the iOS target in Xcode to at least 10.0. This was the reason for the version bump in all the FlutterFire packages. And Firebase admob works just fine on the latest versions.

BREAKING FEAT: forward port to firebase-ios-sdk v7.3.0.

  • Due to this SDK upgrade, iOS 10 is now the minimum supported version by FlutterFire. Please update your build target version.

To fix it increasing your target version iOS target. To change your

Go to your flutter project. Navigate to ios and open  Podfile file and replace the second line of that file with this:

platform :ios, '12.0' or platform :ios, '10.0’ whatever you prefer of >10

这篇关于满足"firebase_admob"的规范,但在Flutter中需要更高的最低部署目标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆