sqlite3.dart
sqlite3.dart copied to clipboard
Build failed because of minimum macOS deployment version
Building flutter project on macos
my pubspec.lock file:
sqlite3: dependency: transitive description: name: sqlite3 sha256: a72c68360757d25a528652f9679dac6e5f23bc52af76b74d4687a148d74e06db url: "https://pub.dev" source: hosted version: "2.6.1" sqlite3_flutter_libs: dependency: transitive description: name: sqlite3_flutter_libs sha256: "50a7e3f294c741d3142eed0ff228e38498334e11e0ccb9d73e0496e005949e44" url: "https://pub.dev" source: hosted version: "0.5.29"
Build error: CocoaPods' output:
Error: The pod "sqlite3" required by the plugin "sqlite3_flutter_libs" requires a higher minimum macOS deployment version than the plugin's reported minimum version. To build, remove the plugin "sqlite3_flutter_libs", or contact the plugin's developers for assistance. Error: Error running pod install
Can you post your Podfile for macos?
Downgrading
dependency_overrides:
sqlite3_flutter_libs: 0.5.27
temporarily resolved it for me.
Can you post your Podfile
platform :osx, '10.14'
# 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', 'ephemeral', '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 Flutter-Generated.xcconfig, then run \"flutter pub get\""
end
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
flutter_macos_podfile_setup
target 'Runner' do
use_frameworks!
use_modular_headers!
flutter_install_all_macos_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_macos_build_settings(target)
end
end
$ just macos (master^) [~/D/m/c/p/total_recall]
cd flutter/assets ; if [ ! -f "sherpa-onnx-streaming-zipformer-en-2023-06-26.tar.bz2" ] ; then wget https://github.com/k2-fsa/sherpa-onnx/releases/download/asr-models/sherpa-onnx-streaming-zipformer-en-2023-06-26.tar.bz2 ; fi ; if [ ! -d "sherpa-onnx-streaming-zipformer-en-2023-06-26" ]; then unar sherpa-onnx-streaming-zipformer-en-2023-06-26.tar.bz2 ; fi
cd flutter; flutter run -d macos
Launching lib/main.dart on macOS in debug mode...
Running pod install... 720ms
CocoaPods' output:
↳
Preparing
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
Using `ARCHS` setting to build architectures of target `Pods-RunnerTests`: (``)
Finding Podfile changes
- FlutterMacOS
- flutter_local_notifications
- flutter_recorder
- path_provider_foundation
- sherpa_onnx_macos
- sqlite3_flutter_libs
Fetching external sources
-> Fetching podspec for `FlutterMacOS` from `Flutter/ephemeral`
-> Fetching podspec for `flutter_local_notifications` from `Flutter/ephemeral/.symlinks/plugins/flutter_local_notifications/macos`
-> Fetching podspec for `flutter_recorder` from `Flutter/ephemeral/.symlinks/plugins/flutter_recorder/macos`
-> Fetching podspec for `path_provider_foundation` from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`
-> Fetching podspec for `sherpa_onnx_macos` from `Flutter/ephemeral/.symlinks/plugins/sherpa_onnx_macos/macos`
-> Fetching podspec for `sqlite3_flutter_libs` from `Flutter/ephemeral/.symlinks/plugins/sqlite3_flutter_libs/darwin`
Resolving dependencies of `Podfile`
CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: all_pods_versions_c_0_4.txt exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: Specs/c/0/4/Flutter/3.13.0/Flutter.podspec.json exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: all_pods_versions_d_c_2.txt exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: Specs/d/c/2/sqlite3/3.47.2/sqlite3.podspec.json exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: Specs/d/c/2/sqlite3/3.47.2/sqlite3.podspec.json exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: Specs/d/c/2/sqlite3/3.47.2/sqlite3.podspec.json exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: Specs/d/c/2/sqlite3/3.47.2/sqlite3.podspec.json exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: Specs/d/c/2/sqlite3/3.47.2/sqlite3.podspec.json exists! Returning local because checking is only performed in repo update
[!] CocoaPods could not find compatible versions for pod "sqlite3":
In snapshot (Podfile.lock):
sqlite3 (= 3.47.2, ~> 3.47.2)
In Podfile:
sqlite3_flutter_libs (from `Flutter/ephemeral/.symlinks/plugins/sqlite3_flutter_libs/darwin`) was resolved to 0.0.1, which depends on
sqlite3 (~> 3.48.0)
Specs satisfying the `sqlite3 (= 3.47.2, ~> 3.47.2), sqlite3 (~> 3.48.0)` dependency were found, but they required a higher minimum deployment target.
/opt/homebrew/Cellar/cocoapods/1.16.2_1/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:317:in 'Molinillo::Resolver::Resolution#raise_error_unless_state'
/opt/homebrew/Cellar/cocoapods/1.16.2_1/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:299:in 'block in Molinillo::Resolver::Resolution#unwind_for_conflict'
<internal:kernel>:91:in 'Kernel#tap'
/opt/homebrew/Cellar/cocoapods/1.16.2_1/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:297:in 'Molinillo::Resolver::Resolution#unwind_for_conflict'
/opt/homebrew/Cellar/cocoapods/1.16.2_1/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:257:in 'Molinillo::Resolver::Resolution#process_topmost_state'
/opt/homebrew/Cellar/cocoapods/1.16.2_1/libexec/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:182:in 'Molinillo::Resolver::Resolution#resolve'
/opt/homebrew/Cellar/cocoapods/1.16.2_1/libexec/gems/molinillo-0.8.0/lib/molinillo/resolver.rb:43:in 'Molinillo::Resolver#resolve'
/opt/homebrew/Cellar/cocoapods/1.16.2_1/libexec/gems/cocoapods-1.16.2/lib/cocoapods/resolver.rb:94:in 'Pod::Resolver#resolve'
/opt/homebrew/Cellar/cocoapods/1.16.2_1/libexec/gems/cocoapods-1.16.2/lib/cocoapods/installer/analyzer.rb:1082:in 'block in Pod::Installer::Analyzer#resolve_dependencies'
/opt/homebrew/Cellar/cocoapods/1.16.2_1/libexec/gems/cocoapods-1.16.2/lib/cocoapods/user_interface.rb:64:in 'Pod::UserInterface.section'
/opt/homebrew/Cellar/cocoapods/1.16.2_1/libexec/gems/cocoapods-1.16.2/lib/cocoapods/installer/analyzer.rb:1080:in 'Pod::Installer::Analyzer#resolve_dependencies'
/opt/homebrew/Cellar/cocoapods/1.16.2_1/libexec/gems/cocoapods-1.16.2/lib/cocoapods/installer/analyzer.rb:125:in 'Pod::Installer::Analyzer#analyze'
/opt/homebrew/Cellar/cocoapods/1.16.2_1/libexec/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:422:in 'Pod::Installer#analyze'
/opt/homebrew/Cellar/cocoapods/1.16.2_1/libexec/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:244:in 'block in Pod::Installer#resolve_dependencies'
/opt/homebrew/Cellar/cocoapods/1.16.2_1/libexec/gems/cocoapods-1.16.2/lib/cocoapods/user_interface.rb:64:in 'Pod::UserInterface.section'
/opt/homebrew/Cellar/cocoapods/1.16.2_1/libexec/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:243:in 'Pod::Installer#resolve_dependencies'
/opt/homebrew/Cellar/cocoapods/1.16.2_1/libexec/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:162:in 'Pod::Installer#install!'
/opt/homebrew/Cellar/cocoapods/1.16.2_1/libexec/gems/cocoapods-1.16.2/lib/cocoapods/command/install.rb:52:in 'Pod::Command::Install#run'
/opt/homebrew/Cellar/cocoapods/1.16.2_1/libexec/gems/claide-1.1.0/lib/claide/command.rb:334:in 'CLAide::Command.run'
/opt/homebrew/Cellar/cocoapods/1.16.2_1/libexec/gems/cocoapods-1.16.2/lib/cocoapods/command.rb:52:in 'Pod::Command.run'
/opt/homebrew/Cellar/cocoapods/1.16.2_1/libexec/gems/cocoapods-1.16.2/bin/pod:55:in '<top (required)>'
/opt/homebrew/Cellar/cocoapods/1.16.2_1/libexec/bin/pod:25:in 'Kernel#load'
/opt/homebrew/Cellar/cocoapods/1.16.2_1/libexec/bin/pod:25:in '<main>'
Error: The pod "sqlite3" required by the plugin "sqlite3_flutter_libs" requires a higher minimum macOS deployment version than the plugin's reported minimum version.
To build, remove the plugin "sqlite3_flutter_libs", or contact the plugin's developers for assistance.
Error: Error running pod install
error: Recipe `macos` failed on line 2 with exit code 1
Can you post your
Podfilefor macos?
platform :osx, '10.14'
# 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', 'ephemeral', '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 Flutter-Generated.xcconfig, then run \"flutter pub get\""
end
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
flutter_macos_podfile_setup
target 'Runner' do
use_frameworks!
use_modular_headers!
flutter_install_all_macos_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_macos_build_settings(target)
end
end
Error: The pod "sqlite3" required by the plugin "sqlite3_flutter_libs" requires a higher minimum macOS deployment version than the plugin's reported minimum version.
What I don't understand is that:
- Pod
sqlite3has a dependency of macos 10.13 here. - The deployment target in
sqlite3_flutter_libsis higher than that.
This is also happening for sqlcipher_flutter_libs: 0.6.6. I fixed it by overriding the dependency
dependency_overrides:
sqlcipher_flutter_libs: 0.6.5
For those still hitting this issue, I was able to solve it by deleting the Podfile.lock files and letting Flutter regenerate them. It seems to be some sort of lock issue that isn't automatically resolved when upgrading to v0.6.6+ from v0.6.5
I am also having this problem.
Deleting Prodfile.lock did not seem to help.
I have not used depenency_overrides before. Do you set a dependency for a particular version and then also include a dependency override?
Sometimes I also get that error when the repository is out of sync, pod repo update did help in some cases.
I just tried pod repo update and followed up with pod update in the macos folder of my app and it works now.
Thanks very much!
Closing since:
- it looks like this is fixable with CocoaPods
- it shouldn't happen with SwiftPM
- we're migrating to Dart build hooks in version 3.x of
package:sqlite3, which also don't have this issue.