ios - Flutter - 找到满足“GoogleMLKit/TextRecognition”依赖的规范,但它们需要更高的最小部署目标
问题描述
我有一个颤振应用
我添加pod 'GoogleMLKit/TextRecognition'
到我的 pod 文件中,并且做了pod install
我收到错误
Specs satisfying the
GoogleMLKit/TextRecognition dependency were found, but they required a higher minimum deployment target.
我想知道:
- 是什么
minimum deployment target
? - 我该如何设置?
编辑:
根据董晨的评论,这是我的 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
解决方案
platform :ios, '10.0'
我可以通过在 pos 文件的顶部进行设置来解决这个错误。
但是当我这样做时,pod install
我得到[!] FirebaseMLVision has been deprecated
推荐阅读
- php - 为什么在 Laravel 或 PHP 中使用变量提示
- optaplanner - Optaplanner 影子变量损坏检查机制
- google-app-engine - GAE:失败:只有 tempfile.TemporaryFile 可供使用
- java - 我可以将模板类中的类文字作为注释的参数传递吗?
- php - FPDF - 无法打开 eps 文件?
- c++ - C++:将 UTF-8 文本转换为 UTF-8 或 UTF-16
- java - 如何将一个 Java 对象从一个 XPage 传递到另一个
- php - 缺少索引的合并 2 查询
- jetty - 如何在嵌入式 Jetty 中配置 ErrorPageErrorHandler?
- php - 从循环中生成的字符串中删除最后一个字符