问题描述
似乎我的pod文件已损坏,我无法在iPhone上安装应用。 我收到错误Pod文件 “正在运行的Pod安装 退出(sigterm) 例外:运行pod install时出错。”我已经尝试过删除旧的pod文件,清理干净,获取软件包并再次为iOS构建并遇到相同的错误。您可以在下面找到我的pod文件和pubspec.yaml,并且没有构建后pubspec.yaml中出现错误。有关如何解决此错误的任何建议?
Pod文件:
# Uncomment this line to define a global platform for your project
# platform :ios,'9.0'
# CocoaPods analytics sends network stats synchronously affecting Flutter build latency.
ENV['COCOAPODS_disABLE_STATS'] = 'true'
project 'Runner',{
'Debug' => :debug,'Profile' => :release,'Release' => :release,}
def Flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..','Flutter','Generated.xcconfig'),__FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually,make sure Flutter pub get is executed first"
end
File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FlutteR_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FlutteR_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig,then run Flutter pub get"
end
require File.expand_path(File.join('packages','Flutter_tools','bin','podhelper'),Flutter_root)
Flutter_ios_podfile_setup
target 'Runner' do
use_frameworks!
use_modular_headers!
Flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
post_install do |installer|
installer.pods_project.targets.each do |target|
Flutter_additional_ios_build_settings(target)
end
end
**Pubspec**
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
Flutter:
sdk: Flutter
sqflite: any
intl: ^0.16.1
percent_indicator: "^1.0.13"
scoped_model: ^1.0.1
assets_audio_player: ^1.0.1
screen: ^0.0.5
Flutter_launcher_icons: "^0.7.0"
shared_preferences: ^0.5.3+1
persistent_bottom_nav_bar: any
custom_navigator: ^0.3.0
Flutter_svg: ^0.18.0
http: ^0.12.1
async: ^2.4.1
stacked: ^1.6.0
stacked_services: ^0.4.3
provider: ^4.3.1
get_it: ^4.0.2
firebase_core: ^0.4.0+9
firebase_analytics: ^5.0.2
firebase_auth: ^0.16.1
firebase_storage: ^3.1.6
cloud_firestore: ^0.13.6
google_maps_Flutter: ^0.5.28+1
map_view: "^0.0.14"
google_maps_webservice: ^0.0.6
geolocator: ^5.3.1
Flutter_polyline_points: ^0.2.1
image_picker: ^0.6.7+2
cached_network_image: ^2.2.0+1
Flutter_icons:
android: "launcher_icon"
ios: true
image_path: "assets/icons/tomato.png"
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
dev_dependencies:
Flutter_test:
sdk: Flutter
# For @R_984_4045@ion on the generic Dart part of this file,see the
# following page: https://dart.dev/tools/pub/pubspec
# The following section is specific to Flutter.
Flutter:
# The following line ensures that the Material Icons font is
# included with your application,so that you can use the icons in
# the material Icons class.
uses-material-design: true
# To add assets to your application,add an assets section,like this:
assets:
- assets/images/
- assets/icons/
# - images/a_dot_ham.jpeg
# An image asset can refer to one or more resolution-specific "variants",see
# https://Flutter.dev/assets-and-images/#resolution-aware.
# For details regarding adding assets from package dependencies,see
# https://Flutter.dev/assets-and-images/#from-packages
# To add custom fonts to your application,add a fonts section here,# in this "Flutter" section. Each entry in this list should have a
# "family" key with the font family name,and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
fonts:
- family: Oxygen
fonts:
- asset: fonts/Oxygen-Regular.ttf
- asset: fonts/Oxygen-Bold.ttf
weight: 700
- asset: fonts/Oxygen-Light.ttf
weight: 300
# For details regarding fonts from package dependencies,# see https://Flutter.dev/custom-fonts/#from-packages
解决方法
使用以下方法解决:
- 扑扑升级
- 扑打干净
- Flutter获取软件包
- rm -Rf ios / Pods
- rm -Rf ios / .symlinks
- pod缓存清理--all
- rm -Rf ios / Flutter / Flutter.framework
- Flutter构建iOS。