代码之家  ›  专栏  ›  技术社区  ›  Gowthaman M manas.abrol

请在pod文件中为此目标指定一个平台?

  •  5
  • Gowthaman M manas.abrol  · 技术社区  · 6 年前

    我想配置Firebase Firestore。我遵循了所有的步骤,但在最后一步,我得到了下面我提到的错误链接。

    吊舱安装 下面的命令错误我得到

    ios 11.4 目标 testing_gowtham 因为没有指定平台。拜托 https://guides.cocoapods.org/syntax/podfile.html#platform .

    我的播客文件:

    # Uncomment the next line to define a global platform for your project
    # platform :ios, '9.0'
    
    target 'testing_gowtham' do
      # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
      use_frameworks!
    
    
      # Pods for testing_gowtham
    
      target 'testing_gowthamTests' do
        inherit! :search_paths
        # Pods for testing
      end
    
      target 'testing_gowthamUITests' do
        inherit! :search_paths
        # Pods for testing
      end
    
        pod 'Firebase/Core'
        pod 'Firebase/Firestore'
    end
    

    我看到这个了 https://guides.cocoapods.org/syntax/podfile.html#platform

    2 回复  |  直到 3 年前
        1
  •  83
  •   Gowthaman M manas.abrol    6 年前

    用下面的文本替换整个pod文件文本,然后检查。

    # Uncomment the next line to define a global platform for your project
    
    # platform :ios, '9.0'
    
    target 'testing_gowtham' do
    
    use_frameworks!
    
    
    pod 'Firebase/Core'
    pod 'Firebase/Firestore'
    end
    

    (或)解决方案2

    platform :ios, '9.0' 正在工作…我只是把它移走了 #

        2
  •  12
  •   Onyekachi Ezeoke    6 年前
    # Uncomment the next line to define a global platform for your project
     platform :ios, '9.0'
    
    target 'testing_gowtham' do
      # Comment the next line if you're not using Swift and don't want to use dynamic frameworks
      use_frameworks!
    
      # Pods for testing_gowtham
     pod 'Firebase/Core'
     pod 'Firebase/Firestore'
    
    end
    
        3
  •  6
  •   Dhaval Gevariya    4 年前

    pod 'PusherSwift' pod 'AlamofireImage' 你必须移除 # 符号来自

    # platform :ios, '9.0'.
    

    然后写下命令 吊舱安装 在你的 终端 .

    当您再次运行项目时,错误将根据 'pusher swift'

        4
  •  4
  •   Hourglasser    4 年前

    删除 Podfile.lock pod install .

    对我来说是有效的,但是要小心-它会替换所有,比如说,你正在使用的库的锁定(缓存)版本。检查自己是否完全明白 Podfile.lock文件 文件不在此处--> https://guides.cocoapods.org/using/using-cocoapods.html

        5
  •  1
  •   Vidura Silva    4 年前

    在flatter项目中,我也面临着这个问题。修正了更新颤振和可可豆到最新版本。

    • rm-射频IO/Pods
    • rm-射频IO/颤振/颤振框架
    • 光盘ios
    • 吊舱安装
    • cd。。
    • 颤振构建ios
        6
  •  1
  •   Paresh Mangukiya    4 年前

    有两种方法可以解决它

    1. # platform :ios, '9.0' // and uncomment it. 
      

      在取消Podfile的注释之后 威尔看起来像这样

      # Uncomment the next line to define a global platform for your project
       platform :ios, '9.0'
      
      target 'testing_gowtham' do
      # Comment the next line if you're not using Swift and don't want to use 
       dynamic frameworks
       use_frameworks!
      
      # Pods for testing_gowtham
       pod 'Firebase/Core'
       pod 'Firebase/Firestore'
      end
      

      之后删除 ios/Podfile.lock pod install

    2. 在终端中按照以下命令修复问题:

      gem uninstall cocoapods
      gem install cocoapods
      rm Podfile.lock
      pod setup
      pod install
      

    rvm 作为根用户,则必须 sudo 安装任何东西。喜欢 sudo gem uninstall cocoapods

        7
  •  1
  •   Tasnuva Tavasum oshin    3 年前

    取消平台注释并设置ios:10.0

        platform :ios, '10.0'
    

        8
  •  0
  •   Apurva Aggarwal    4 年前

    平台:ios,“9.0”正在运行…我只是删除了这个

        9
  •  0
  •   Mohamed Mo Kawsara    4 年前

    在我的情况下,这是因为一个老项目,我没有运行了6个月左右。

    flutter create -i swift -a kotlin project_name

    并移动了 ios 文件夹到我的项目,运行它,它的工作!

        10
  •  0
  •   Kudos    3 年前

    错误 运行flutter firebase项目 . 替换:

    # platform :ios, '9.0' 具有 platform :ios, '9.0'

    # 评论 取消注释

        11
  •  0
  •   Mohammed Salim Al-Othman    3 年前

    要解决此问题: 在Andriod Studio-->ios-->Podfile中打开pod文件,您将在文件顶部看到一个注释掉的示例:

    取消对此行的注释,然后重新运行应用程序以查看它是否有效。如果它仍然不起作用,那么更改版本以符合您的最低要求。我已经将我的设置为ios12,因为我的一个依赖项需要这样做。

        12
  •  -1
  •   MD MEHEDI HASAN    3 年前

    必须从中删除#符号

    • 光盘ios
    • 打开podfile

    删除#符号并保存此文件

    然后在终端中编写命令pod install。