我已经升级了XCode和MacOS,现在我的Ffltter项目(和XCode一样)不能工作了.豆荚有点问题,但我不明白

细节

命令

/opt/homebrew/Cellar/cocoapods/1.13.0/libexec/bin/pod install

报告

  • 你干什么了?

  • 你以为会发生什么呢?

  • 结果发生了什么呢?

   CocoaPods : 1.13.0
        Ruby : ruby 3.2.2 (2023-03-30 revision e51014f9c0) [arm64-darwin23]
    RubyGems : 3.4.10
        Host : macOS 14.0 (23A344)
       Xcode : 15.0.1 (15A507)
         Git : git version 2.39.3 (Apple Git-145)
Ruby lib dir : /opt/homebrew/Cellar/ruby/3.2.2_1/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/

插件

cocoapods-clean       : 0.0.1
cocoapods-deintegrate : 1.0.5
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.1
cocoapods-trunk       : 1.6.0
cocoapods-try         : 1.2.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,
}

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__))
  target 'RunnerTests' do
    inherit! :search_paths
  end
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
  end
end

误差率

JSON::Parser误差率 - Failed to parse JSON at file: '/Users/koptehe/.cocoapods/repos/trunk/Specs/4/2/c/FlutterMacOS/3.13.2/FlutterMacOS.podspec.json'.

unexpected token at ''
/opt/homebrew/Cellar/cocoapods/1.13.0/libexec/gems/cocoapods-core-1.13.0/lib/cocoapods-core/specification/json.rb:66:in `rescue in from_json'
/opt/homebrew/Cellar/cocoapods/1.13.0/libexec/gems/cocoapods-core-1.13.0/lib/cocoapods-core/specification/json.rb:61:in `from_json'
/opt/homebrew/Cellar/cocoapods/1.13.0/libexec/gems/cocoapods-core-1.13.0/lib/cocoapods-core/specification.rb:752:in `from_string'
/opt/homebrew/Cellar/cocoapods/1.13.0/libexec/gems/cocoapods-core-1.13.0/lib/cocoapods-core/specification.rb:726:in `from_file'
/opt/homebrew/Cellar/cocoapods/1.13.0/libexec/gems/cocoapods-core-1.13.0/lib/cocoapods-core/source.rb:188:in `specification'
/opt/homebrew/Cellar/cocoapods/1.13.0/libexec/gems/cocoapods-core-1.13.0/lib/cocoapods-core/specification/set.rb:58:in `block in specification_name'
/opt/homebrew/Cellar/cocoapods/1.13.0/libexec/gems/cocoapods-core-1.13.0/lib/cocoapods-core/specification/set.rb:56:in `each'
/opt/homebrew/Cellar/cocoapods/1.13.0/libexec/gems/cocoapods-core-1.13.0/lib/cocoapods-core/specification/set.rb:56:in `specification_name'
/opt/homebrew/Cellar/cocoapods/1.13.0/libexec/gems/cocoapods-core-1.13.0/lib/cocoapods-core/cdn_source.rb:216:in `search'
/opt/homebrew/Cellar/cocoapods/1.13.0/libexec/gems/cocoapods-core-1.13.0/lib/cocoapods-core/source/aggregate.rb:83:in `block in search'
/opt/homebrew/Cellar/cocoapods/1.13.0/libexec/gems/cocoapods-core-1.13.0/lib/cocoapods-core/source/aggregate.rb:83:in `select'
/opt/homebrew/Cellar/cocoapods/1.13.0/libexec/gems/cocoapods-core-1.13.0/lib/cocoapods-core/source/aggregate.rb:83:in `search'
/opt/homebrew/Cellar/cocoapods/1.13.0/libexec/gems/cocoapods-1.13.0/lib/cocoapods/resolver.rb:416:in `create_set_from_sources'
/opt/homebrew/Cellar/cocoapods/1.13.0/libexec/gems/cocoapods-1.13.0/lib/cocoapods/resolver.rb:385:in `find_cached_set'
/opt/homebrew/Cellar/cocoapods/1.13.0/libexec/gems/cocoapods-1.13.0/lib/cocoapods/resolver.rb:360:in `specifications_for_dependency'
/opt/homebrew/Cellar/cocoapods/1.13.0/libexec/gems/cocoapods-1.13.0/lib/cocoapods/resolver.rb:165:in `search_for'
/opt/homebrew/Cellar/cocoapods/1.13.0/libexec/gems/cocoapods-1.13.0/lib/cocoapods/resolver.rb:274:in `block in sort_dependencies'
/opt/homebrew/Cellar/cocoapods/1.13.0/libexec/gems/cocoapods-1.13.0/lib/cocoapods/resolver.rb:267:in `each'
/opt/homebrew/Cellar/cocoapods/1.13.0/libexec/gems/cocoapods-1.13.0/lib/cocoapods/resolver.rb:267:in `sort_by'
/opt/homebrew/Cellar/cocoapods/1.13.0/libexec/gems/cocoapods-1.13.0/lib/cocoapods/resolver.rb:267:in `sort_by!'
/opt/homebrew/Cellar/cocoapods/1.13.0/libexec/gems/cocoapods-1.13.0/lib/cocoapods/resolver.rb:267:in `sort_dependencies'
/Users/koptehe/.gem/ruby/2.7.2/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:60:in `block in sort_dependencies'
/Users/koptehe/.gem/ruby/2.7.2/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:77:in `with_no_such_dependency_error_handling'
/Users/koptehe/.gem/ruby/2.7.2/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:59:in `sort_dependencies'
/Users/koptehe/.gem/ruby/2.7.2/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:754:in `push_state_for_requirements'
/Users/koptehe/.gem/ruby/2.7.2/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:744:in `require_nested_dependencies_for'
/Users/koptehe/.gem/ruby/2.7.2/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:727:in `activate_new_spec'
/Users/koptehe/.gem/ruby/2.7.2/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:684:in `attempt_to_activate'
/Users/koptehe/.gem/ruby/2.7.2/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:254:in `process_topmost_state'
/Users/koptehe/.gem/ruby/2.7.2/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:182:in `resolve'
/Users/koptehe/.gem/ruby/2.7.2/gems/molinillo-0.8.0/lib/molinillo/resolver.rb:43:in `resolve'
/opt/homebrew/Cellar/cocoapods/1.13.0/libexec/gems/cocoapods-1.13.0/lib/cocoapods/resolver.rb:94:in `resolve'
/opt/homebrew/Cellar/cocoapods/1.13.0/libexec/gems/cocoapods-1.13.0/lib/cocoapods/installer/analyzer.rb:1082:in `block in resolve_dependencies'
/opt/homebrew/Cellar/cocoapods/1.13.0/libexec/gems/cocoapods-1.13.0/lib/cocoapods/user_interface.rb:64:in `section'
/opt/homebrew/Cellar/cocoapods/1.13.0/libexec/gems/cocoapods-1.13.0/lib/cocoapods/installer/analyzer.rb:1080:in `resolve_dependencies'
/opt/homebrew/Cellar/cocoapods/1.13.0/libexec/gems/cocoapods-1.13.0/lib/cocoapods/installer/analyzer.rb:125:in `analyze'
/opt/homebrew/Cellar/cocoapods/1.13.0/libexec/gems/cocoapods-1.13.0/lib/cocoapods/installer.rb:422:in `analyze'
/opt/homebrew/Cellar/cocoapods/1.13.0/libexec/gems/cocoapods-1.13.0/lib/cocoapods/installer.rb:244:in `block in resolve_dependencies'
/opt/homebrew/Cellar/cocoapods/1.13.0/libexec/gems/cocoapods-1.13.0/lib/cocoapods/user_interface.rb:64:in `section'
/opt/homebrew/Cellar/cocoapods/1.13.0/libexec/gems/cocoapods-1.13.0/lib/cocoapods/installer.rb:243:in `resolve_dependencies'
/opt/homebrew/Cellar/cocoapods/1.13.0/libexec/gems/cocoapods-1.13.0/lib/cocoapods/installer.rb:162:in `install!'
/opt/homebrew/Cellar/cocoapods/1.13.0/libexec/gems/cocoapods-1.13.0/lib/cocoapods/command/install.rb:52:in `run'
/Users/koptehe/.gem/ruby/2.7.2/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
/opt/homebrew/Cellar/cocoapods/1.13.0/libexec/gems/cocoapods-1.13.0/lib/cocoapods/command.rb:52:in `run'
/opt/homebrew/Cellar/cocoapods/1.13.0/libexec/gems/cocoapods-1.13.0/bin/pod:55:in `<top (required)>'
/opt/homebrew/Cellar/cocoapods/1.13.0/libexec/bin/pod:25:in `load'
/opt/homebrew/Cellar/cocoapods/1.13.0/libexec/bin/pod:25:in `<main>'

Flutter 翼doctor

doctor 摘要(要查看所有详细信息,请运行Ffltter Doctor-v):

[✓] Flutter (Channel stable, 3.13.6, on macOS 14.0 23A344 darwin-arm64)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.3)
[✓] VS Code (version 1.83.1)
[✓] Connected device (2 available)
[✓] Network resources

Additional info

  • 我试着赚rm -rf ~/.cocoapods/repos/trunk英镑,但没用
  • 我try 删除所有CocoaPods并重新安装(gem list --local | grep cocoapods 然后`gem卸载
  • 我试着重新加载我的Mac
  • 我try 了flutter clean+flutter pub get-&gt;pod install的所有组合
  • 我用旧的pubspec.yaml创建了一个新项目,在此之后它在pod install上抛出错误

pubspec.yaml

name: unknown_app
description: Unknown app
publish_to: 'none'
version: 1.0.0+1

environment:
  sdk: ">=3.0.0 <4.0.0"

dependencies:
  flutter:
    sdk: flutter
  flutter_localizations:
    sdk: flutter
  bloc: ^8.1.2
  bloc_concurrency: ^0.2.2
  equatable: ^2.0.5
  firebase_core: ^2.20.0
  intl: 0.18.1
  formz: ^0.6.0
  cupertino_icons: ^1.0.6
  flutter_bloc: ^8.1.3
  url_launcher: ^6.1.11
  flutter_svg: ^2.0.7
  geolocator: ^10.1.0
  google_maps_flutter: ^2.5.0
  google_maps_cluster_manager: ^3.0.0+1
  flutter_native_timezone: ^2.0.0
  http: ^1.1.0
  webview_flutter: ^4.4.1
  mask_text_input_formatter: ^2.4.0
  image_picker: ^1.0.4
  firebase_messaging: ^14.7.2
  flutter_local_notifications: ^16.1.0
  sentry_flutter: ^7.11.0
  in_app_review: ^2.0.6
  package_info_plus: ^4.0.2
  flutter_secure_storage: ^9.0.0
  rive: ^0.12.1
  async: ^2.11.0
  

dev_dependencies:
  bloc_test: ^9.1.3
  mocktail: ^0.3.0
  very_good_analysis: ^5.0.0+1
  flutter_test:
    sdk: flutter
  flutter_lints: ^2.0.0

flutter:
  uses-material-design: true
  generate: true

  # To add assets to your application, add an assets section, like this:
  assets:
    - assets/icons/

我想得到pod install分,然后在iOS上运行我的应用程序.

推荐答案

TLDR;

  1. try 更新Flutter
  2. try 用this instructions更新可可

I fixed my problem with...我不知道

发生了什么?据我所知,可可公司并没有Ffltter 3.13.6(明确地说是FlutterMacOS)版本的文件.

由于错误发生,我已经更新了Flutter到3.13.9,可可到1.13.4(原来是1.13.3)

另外,删除Runner.xcworkspace可能会有所帮助,因为在更新cocoaFlutter之后,我按照these instructions做了所有的事情--一切都很正常.

Ios相关问答推荐

iPhone:iOS 17.4中没有气压数据

我如何确保用户继续他们在应用程序中停止的地方?

如何仅在TextField中的文本发生更改时才执行代码?

为什么Reaction-Native-Vision-Camera不能与闪光灯一起使用?

AVFoundation Camera推出变焦SWIFT

UIAlertController的空子类是否可以与`appearance(whenContainedInInstancesOf:)`一起安全使用

如何在KMM项目中处理PHPickerViewController的回调?

iphone 11 和 iphone 12 对于相同的布局显示不同的结果

在 SwiftUI 中以编程方式插入内嵌图像

如何在SwiftUI中实现淡入淡出加粘标题屏幕效果

如何制作支持不同语言的iOS应用

过渡动画在 iOS16 中不起作用,但在 iOS15 中起作用

SwiftUI 选项卡式视图防止滑动到下一个选项卡

检测 iPhone 应用程序中是否存在摄像头?

Got Unrecognized selector -replacementObjectForKeyedArchiver: 在 Swift 中实现 NSCoding 时崩溃

~= Swift 中的运算符

无法加载从带有标识符的包中的笔尖引用的图像

有没有办法在应用store 之外分发 ios 应用程序?

找不到开发者磁盘映像

错误 itms-90035 - Xcode