我已经设计并发布了Win10中开发的Flutter项目的Android版本,现在我正在尝试发布iOS版本,但是在ios上尝试第一个flutter run
时遇到此错误:
ios/Pods/FirebaseInstallations/FirebaseInstallations/Source/Library/FIRInstallationsLogger.h:19:9: fatal error: 'FirebaseCore/FIRLogger.h' file not found
#import <FirebaseCore/FIRLogger.h>
我已经尝试过flutter clean
,但是结果是一样的。
答案 0 :(得分:0)
更多细节。
pubspec.yaml
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
cupertino_icons: ^0.1.3
cloud_firestore: ^0.14.0+3
firebase_crashlytics: ^0.2.1+1
firebase_performance: ^0.4.0+2
firebase_messaging: ^7.0.3
firebase_analytics: ^6.0.2
firebase_remote_config: ^0.4.0+2
firebase_auth: ^0.18.0+2
firebase_in_app_messaging: ^0.2.0+1
firebase_dynamic_links:
git:
url: https://github.com/mrmilu/flutterfire
path: packages/firebase_dynamic_links
ref: firebase_dynamic_links
random_string: ^2.0.0
google_sign_in: ^4.5.1
flutter_facebook_login: ^3.0.0
apple_sign_in: ^0.1.0
provider: ^4.0.1
country_code_picker: ^1.4.0
introduction_screen: ^1.0.9
flutter_countdown_timer: ^1.1.0
slimy_card: ^1.0.4
json_annotation: ^3.0.0
esys_flutter_share: ^1.0.2
rxdart: ^0.23.1
flutter_secure_storage: ^3.3.3
package_info: ^0.4.0+13
dev_dependencies:
flutter_test:
sdk: flutter
build_runner: ^1.0.0
json_serializable: ^3.2.0
flutter_launcher_icons: ^0.8.0
flutter_native_splash: ^0.1.9
flutter_icons:
android: true
ios: true
image_path: "assets/images/AppIcon.png"
adaptive_icon_background: "#FFDF00"
flutter_native_splash:
image: assets/images/SplashScreen.png
color: "#FFDF00"
flutter:
uses-material-design: true
assets:
- assets/images/
扑打医生:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.22.1, on Mac OS X 10.15.7 19H2, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 12.0.1)
[✓] Android Studio (version 4.0)
[!] IntelliJ IDEA Community Edition (version 2019.3.3)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.49.2)
[✓] Connected device (2 available)
Podfile:
# Uncomment this line to define a global platform for your project
platform :ios, '9.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
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end