安装“firebase_firestore”后出现Cocoapods错误颤振插件 [英] Cocoapods error after installing "firebase_firestore" Flutter plugin

查看:1043
本文介绍了安装“firebase_firestore”后出现Cocoapods错误颤振插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我的应用程序与Firebase RTDB一起工作,但想试验Firestore,所以我按照说明安装了 firebase_firestore '插件。



当我运行我的应用程序时,我得到以下错误:
$

 解决`Podfile`的依赖关系
[!]无法满足以下要求:

- 需要Firebase / Firestore通过`firebase_firestore(0.0.1)`

找到满足Firebase / Firestore依赖关系的规范,但是它们需要更高的最小部署目标。

我试过指定 platform:ios,'9.0'还有 10.0 在我的Podfile中,但是没有什么区别。所有其他的豆荚安装罚款。



这是整个Cocoapods运行日志: https://pastebin.com/raw/SBz8Bqgf



我的Podfile看起来像这样(标准的Flutter Podfile):

 #取消注释此行为您的项目定义全球平台
#platform:ios,'9.0'

if ENV ['FLUTTER_FRAMEWORK_DIR'] == nil
abort('请将FLUTTER_FRAMEWORK_DIR设置为包含Flutter.framework的目录)
结束

target'Runner'do
#Pods for Runner

#颤音荚
pod'Flutter',:path => ENV ['FLUTTER_FRAMEWORK_DIR']

如果File.exists? '../.flutter-plugins'
flutter_root = File.expand_path('..')
File.foreach('../。flutter-plugins'){| line |
plugin = line.split(pattern ='=')
if plugin.length == 2
name = plugin [0] .strip()
path = plugin [1 ] .strip()
resolved_pa​​th = File.expand_path(#{path} / ios,flutter_root)
pod name,:path => resolve_path
else
puts无效的插件规范:#{line}
end
}
end
end

post_install do | installer |
installer.pods_project.targets.each do | target |
target.build_configurations.each do | config |
config.build_settings ['ENABLE_BITCODE'] ='NO'
end
end
end

这是一个到Podfile.lock的链接,也许这更有趣。我发现它还没有被Firestore更新,大概是因为运行失败: https://pastebin.com/

我几天前面临同样的问题。 b $ b

我认为我通过执行以下步骤来修复它:


  1. 运行命令pod repo update更新您的回购信息)

  2. 然后运行命令pod update(它将使用最新的回购信息更新您的pod)

让我知道这是否解决您的问题:)

I've got my app working with the Firebase RTDB but want to experiment with Firestore so I have followed the instructions and installed the 'firebase_firestore' plugin.

When I run my app now I get the following error:

 Resolving dependencies of `Podfile`
    [!] Unable to satisfy the following requirements:

    - `Firebase/Firestore` required by `firebase_firestore (0.0.1)`

    Specs satisfying the `Firebase/Firestore` dependency were found, but they required a higher minimum deployment target.

I've tried specifying platform :ios, '9.0' and also 10.0in my Podfile but that didn't make any difference. All other pods install fine.

Here's the entire Cocoapods run log: https://pastebin.com/raw/SBz8Bqgf

My Podfile looks like this (standard Flutter Podfile):

# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'

if ENV['FLUTTER_FRAMEWORK_DIR'] == nil
  abort('Please set FLUTTER_FRAMEWORK_DIR to the directory containing Flutter.framework')
end

target 'Runner' do
  # Pods for Runner

  # Flutter Pods
  pod 'Flutter', :path => ENV['FLUTTER_FRAMEWORK_DIR']

  if File.exists? '../.flutter-plugins'
    flutter_root = File.expand_path('..')
    File.foreach('../.flutter-plugins') { |line|
      plugin = line.split(pattern='=')
      if plugin.length == 2
        name = plugin[0].strip()
        path = plugin[1].strip()
        resolved_path = File.expand_path("#{path}/ios", flutter_root)
        pod name, :path => resolved_path
      else
        puts "Invalid plugin specification: #{line}"
      end
    }
  end
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['ENABLE_BITCODE'] = 'NO'
    end
  end
end

Here's a link to the Podfile.lock, maybe that's more interesting. I see that it has not been updated with Firestore though, presumably because the run fails: https://pastebin.com/raw/hj2jHE76

解决方案

I faced the same issue few days ago.

I think I fixed it by doing the following steps:

  1. Run the command 'pod repo update' (it will update your repo information)
  2. Then run the command 'pod update' (it will update your pods using the latest repo information)

Let me know if this is solving your issue :)

这篇关于安装“firebase_firestore”后出现Cocoapods错误颤振插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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