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

问题描述 投票:0回答:1

问题:

\[!\] 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
ios flutter flutter-build flutter-ios-build
1个回答
0
投票

我只是尝试安装相同的软件包(

libphonenumber_plugin
)和相同的错误消息。

错误消息清晰

找到了满足

libphonenumber_plugin (from

.symlinks/plugins/libphonenumber_plugin/ios`) 依赖项的
pec,但它们需要更高的最低部署目标

要解决该问题,您需要将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

© www.soinside.com 2019 - 2024. All rights reserved.