尝试运行flutter时出现以下错误:
Launching lib/main.dart on iPhone XR in debug mode...
Running pod install... 2.2s
├─Assembling Flutter resources... 1.8s
└─Compiling, linking and signing... 4.3s
Xcode build done. 10.0s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
/Users/me/Downloads/myapp2/my_app/ios/Runner/GeneratedPluginRegistrant.m:6:9: fatal error: 'firebase_core/FirebaseCorePlugin.h' file not found
#import <firebase_core/FirebaseCorePlugin.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Could not build the application for the simulator.
Error launching application on iPhone XR.
flutter doctor
说一切都是正确的,我已经运行了flutter packages get
,将频道改为dev,我尝试了删除podspec.lock
和Podfile.lock
的各种迭代,但没有运气。虽然我无法在我的应用程序中的任何位置看到此文件,但我可以在firebase_core git repo中看到它。有什么地方我可以手动放置它吗?
如何解决这个问题:
flutter channel beta
dependencies: flutter: sdk: flutter firebase_core: ^0.3.1 # add dependency for Firebase Core
flutter packages get
pod install