我在运行pod install时遇到了这个错误

[!] The 'Pods-Runner' target has transitive dependencies that include static binaries: (/Users/me/Documents/flutter/flutter/bin/cache/artifacts/engine/ios/Flutter.framework)

在做了一些调查后,它说我的Podfile人中有use frameworks!人导致了这个问题.如果我注释掉use frameworks!,我会得到这个错误.你知道问题出在哪里吗?在过go 的三天里,我一直被困在这里.

ld: framework not found Flutter
clang: error: linker command failed with exit code 1 (use -v to see invocation)

也是根据什么写的here.将以下内容添加到Podfile中对我也不起作用.我的Podfile看起来就是这个样子.

# 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'

def parse_KV_file(file,seperator='=')
  file_abs_path = File.expand_path(file)
  if !File.exists? file_abs_path
    return [];
  end
  pods_ary = []
  skip_line_start_symbols = ["#", "/"]
  File.foreach(file_abs_path) { |line|
      next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
      plugin = line.split(pattern=seperator)
      if plugin.length == 2
        podname = plugin[0].strip()
        path = plugin[1].strip()
        podpath = File.expand_path("#{path}", file_abs_path)
        pods_ary.push({:name => podname,:path=>podpath});
      else
        puts "Invalid plugin specification: #{line}"
      end
  }
  return pods_ary
end

target 'Runner' do
  # Flutter Pods
  #use_frameworks!

  pod 'EstimoteSDK'
  pod 'SwiftKeychainWrapper'
  pod 'Alamofire'

  generated_xcode_build_settings = parse_KV_file("./Flutter/Generated.xcconfig")
  if generated_xcode_build_settings.empty?
    puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter build or flutter run is executed once first."
  end
  generated_xcode_build_settings.map{ |p|
    if p[:name]=='FLUTTER_FRAMEWORK_DIR'
      pod 'Flutter', :path => p[:path]
    end
  }

  # Plugin Pods
  plugin_pods = parse_KV_file("../.flutter-plugins")
  plugin_pods.map{ |p|
    pod p[:name], :path => File.expand_path("ios",p[:path])
  }
end

pre_install do |installer|
      # workaround for https://github.com/CocoaPods/CocoaPods/issues/3289
      Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
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

推荐答案

对我来说,完全重新安装Flutter 翼是可行的.

Flutter相关问答推荐

当未聚焦且非空时,在flutter中更改文本字段的标签 colored颜色

Flutter -设计具有奇怪边界的容器的方法Radius

如何增加容器高度?

Android Emulator冻结,但在调整窗口大小时解冻

如何使用新的Riverpod语法将依赖传递给AsyncNotifier?

来自FutureProvider的数据只打印两个不同的变量,它们对一个实例只有一次相同的值,为什么?

如何让经过Firebase身份验证的用户能够将Zip文件上载到Firebase云存储?

应为标识符,并应为查找)错误

如何将WebViewWidget和WillPopScope结合起来

构建方法中的性能声明小部件

打开键盘时屏幕组件会被压扁

Flutter:如何在 Future 函数上添加网络判断和 showDialog

Flutter 未处理的异常 - 对 null 值使用 Null 判断运算符

在允许屏幕 Select 和点击的同时保持通用对话框显示

Flutter - firebase_auth_web 5.4.0 依赖于 intl ^0.17.0 但我必须使用更高版本 (intl ^0.18.0)

是否可以在 flutter 应用程序中使用 jetpack compose?

Flutter Flame OS 错误:使用音频文件 .wav 时出现该进程无法访问该文件,因为它正被另一个进程使用

为什么轮播加载图片很慢?

如何在椭圆形图像周围添加边框?Flutter

如何将图像网络装箱到具有边界半径的容器中