问题描述
我有一个流畅的应用程序
I have a flutter app
我在pod文件中添加了 pod'GoogleMLKit/TextRecognition'
,并做了 pod安装
I added pod 'GoogleMLKit/TextRecognition'
to my pod file, and did pod install
我得到了错误找到了满足 GoogleMLKit/TextRecognition 依赖性的
Specs,但它们需要更高的最低部署目标.
I get the errorSpecs satisfying the
GoogleMLKit/TextRecognition dependency were found, but they required a higher minimum deployment target.
我想知道:
- 什么是
最低部署目标
? - 如何设置?
根据董辰的评论,这是我的Podfile:
According to Dong Chen comment, here is my Podfile:
# Uncomment this line to define a global platform for your project
platform :ios, '10.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
pod 'GoogleMLKit/TextRecognition'
post_install do |installer|
installer.pods_project.build_configurations.each do |config|
# Can be removed when moving to cocoapods 1.10
config.build_settings['CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER'] = 'NO'
end
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
# Inherit the deployment target defined in this Podfile instead, e.g. platform :ios, '11.0' at the top of this file
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
end
end
end
推荐答案
我能够通过在pos文件顶部设置 platform:ios,'10 .0'
来解决此错误.
I was able to solve this error by setting platform :ios, '10.0'
at the top of the pos file.
但是当我执行 pod install
时,我会得到 [!] FirebaseMLVision已被弃用
But when I do pod install
I get [!] FirebaseMLVision has been deprecated
这篇关于Flutter-找到了满足GoogleMLKit/TextRecognition依赖性的规范,但它们需要更高的最低部署目标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!