无法在iOS模拟器中运行应用程序

dnph8jn4  于 11个月前  发布在  iOS
关注(0)|答案(1)|浏览(185)

发行人:

\[!\] CocoaPods could not find compatible versions for pod "libphonenumber_plugin":
  In Podfile:
    libphonenumber_plugin (from \`.symlinks/plugins/libphonenumber_plugin/ios\`)

Specs satisfying the \`libphonenumber_plugin (from \`.symlinks/plugins/libphonenumber_plugin/ios\`)\` dependency were found, but they required a higher minimum deployment target.

Failed to run Pod install.

字符串
我想在iOS模拟器中运行应用程序。
这个错误是在我特灵在iOS Emulator中构建应用程序时提出的。

pubspec.yaml:

name: coincrux
  description: A  Flutter project fro Astute Technologies

publish_to: 'none' 

version: 1.0.0+1

environment:
  sdk: '>=2.19.4 <3.0.0'

dependencies:
  cached_network_image: ^3.2.3
  candlesticks: ^2.1.0
  carousel_slider: ^4.2.1
  cloud_firestore: ^4.13.1
  cupertino_icons: ^1.0.2
  curved_navigation_bar: ^1.0.3
  firebase_auth: ^4.6.3
  firebase_core: ^2.20.0
  firebase_messaging: ^14.7.10
  firebase_storage: ^11.5.1
  flutter:
    sdk: flutter
  flutter_card_swiper: ^6.0.0
  flutter_launcher_icons: ^0.13.1
  get: ^4.6.5
  google_sign_in: ^6.1.4
  http: ^1.1.2
  image_picker: ^1.0.0
  intl_phone_number_input: ^0.7.3+1
  photo_view: ^0.14.0
  pin_code_fields: ^8.0.1
  provider: ^6.0.5
  share_plus: ^7.0.1
  shared_preferences: ^2.2.1
  timeago: ^3.5.0

dev_dependencies:
  flutter_test:
    sdk: flutter
flutter_icons:
  android: "launcher_icon"
  ios: true

  image_path: "assets/images/splashicon.png"
  
  flutter_lints: ^2.0.0

flutter:

  
  uses-material-design: true

  assets:
    - assets/images/
  
  fonts:
    - family: RobotoFlex
      fonts:
        - asset: assets/fonts/RobotoFlex.ttf


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

xxe27gdn

xxe27gdn1#

我只是试图安装相同的软件包( libphonenumber_plugin )和相同的错误消息。
错误信息是 clear
找到了满足libphonenumber_plugin (from.symlinks/plugins/libphoneber_plugin/ios)依赖的佩奇,**但它们需要更高的最小部署目标**。 要解决这个问题,您需要将deploymnet目标升级到12.0。 目前,在您的pod`文件中,您有:

# Uncomment this line to define a global platform for your project
platform :ios, '11.0'

字符串
所以把它从“11.0”改为“12.0”:

platform :ios, '12.0'


不要忘记运行pod install

相关问题