运行 pod install 时出错。在 iPhone 8 上启动应用程序时出错

问题描述 投票:0回答:3

运行我的应用程序后,我收到此错误: 运行 pod install 时出错 在 iPhone 8 上启动应用程序时出错。

我已经尝试过了: 取消注释该行

#platformform:iOS,9.0

  1. sudo arch -x86_64 gem install ffi

  2. arch -x86_64 pod 安装

任何帮助将不胜感激

xcode flutter cocoapods
3个回答
0
投票
  1. 从项目/ios 中删除 pods 文件夹
  2. 从项目/ios 中删除 .symlinks
  3. 删除podfile.lock
  4. 运行 arch -x86_64 pod install
  5. 然后尝试 flutter run

0
投票

请访问您的 Podfile,您会注意到前几行包含以下信息。

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

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
  'Debug' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

向下滚动并注释掉这三行。

target 'Runner' do
  use_frameworks!
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
 # target 'RunnerTests' do
 #   inherit! :search_paths
 # end

0
投票
  1. 如果您添加额外的配置,请首先备份您的 info.plist 和 AppDelegate.swift 文件。

  2. 从项目/ios 中删除 pods 文件夹

并在您的终端中运行此命令

  1. flutter create --platform ios .
  2. cd ios
  3. pod 缓存清理 — 全部
  4. 豆荚干净
  5. 豆荚分解
  6. sudo gem install cocoapods-deintegrate cocoapods-clean
  7. sudo arch -x86_64 gem install ffi
  8. arch -x86_64 pod 存储库更新
  9. arch -x86_64 pod 安装

它工作了。 你可以看到更多修复

© www.soinside.com 2019 - 2024. All rights reserved.