我已经被颤振核心的构建错误困住了好几天。这是 iOS 版本,到目前为止还没有尝试过 android,因为如果我无法让 iOS 运行也没关系:)
Running Xcode build...
Xcode build done. 40.0s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
While building module 'firebase_core' imported from /Users/mikael.melander/Documents/development/swift-it/storyspot/flutter/ios/Runner/GeneratedPluginRegistrant.m:34:
In file included from <module-includes>:1:
In file included from /Users/mikael.melander/Documents/development/swift-it/storyspot/flutter/build/ios/Debug-iphoneos/firebase_core/firebase_core.framework/Headers/firebase_core-umbrella.h:13:
In file included from /Users/mikael.melander/Documents/development/swift-it/storyspot/flutter/build/ios/Debug-iphoneos/firebase_core/firebase_core.framework/Headers/FLTFirebaseCorePlugin.h:11:
/Users/mikael.melander/Documents/development/swift-it/storyspot/flutter/build/ios/Debug-iphoneos/firebase_core/firebase_core.framework/Headers/FLTFirebasePlugin.h:9:9: error: include of non-modular header inside framework module 'firebase_core.FLTFirebasePlugin': 'Pods/FirebaseCore/FirebaseCore/Sources/Public/FirebaseCore/FirebaseCore.h' [-Werror,-Wnon-modular-include-in-framework-module]
#import <FirebaseCore/FirebaseCore.h>
^
1 error generated.
/Users/mikael.melander/Documents/development/swift-it/storyspot/flutter/ios/Runner/GeneratedPluginRegistrant.m:34:9: fatal error: could not build module 'firebase_core'
#import <firebase_core/FLTFirebaseCorePlugin.h>
~~~~~~~^
2 errors generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Could not build the precompiled application for the device.
我尝试过 flutter channel、master、dev 和 stable。 我已经尝试尽可能多地更新插件。 我已经完成了flutter clean,删除了pubspec.lock,podfile.lock,pods,删除了DerivedData等。
发布规范文件:
environment:
sdk: '>=2.7.0 <3.0.0'
dependencies:
flutter:
sdk: flutter
rxdart: ^0.25.0
http: ^0.12.2
google_maps_flutter: 1.1.1
location: ^3.0.2
dio: 3.0.10
fluster: 1.1.2
flutter_cache_manager: 2.1.1
carousel_slider: 2.2.1
cached_network_image: 2.5.0
cupertino_icons: ^0.1.3
shared_preferences: ^0.5.12+4
intl: 0.16.1
multi_image_picker: 4.7.12
font_awesome_flutter: 8.8.1
get_it: 4.0.4
get: ^3.26.0
introduction_screen: ^1.0.9
smart_select: ^3.0.3
flutter_google_places: 0.2.8
shimmer: ^1.1.1
google_fonts: ^1.1.0
path_provider: ^1.6.14
progress_button: ^0.0.2
email_validator: ^1.0.5
device_info: ^0.4.2+7
audioplayers: 0.16.2
url_launcher: ^5.7.10
google_sign_in: 4.5.3
uni_links: ^0.4.0
share: ^0.6.4+5
progress_dialog: ^1.2.4
dio_http_cache: ^0.2.8
permission_handler: ^5.1.0+2
devicelocale: ^0.3.3
firebase_analytics: ^7.0.1
flutter_sound:
path: /Users/mikael.melander/Documents/development/swift-it/storyspot/tau/flutter_sound
sortedmap: ^0.4.2+1
latlong: ^0.6.1
flutter_svg: ^0.19.1
sign_in_with_apple: ^2.5.4
keyboard_visibility: 0.5.6
image_cropper: ^1.3.1
flutter_bounce: ^1.0.8
flutter_document_picker: ^4.0.1
flutter_email_sender: ^4.0.0
firebase_core: 0.7.0
dev_dependencies:
flutter_test:
sdk: flutter
我正在制作 flutter_sound 的自定义分支,但没有任何依赖关系发生变化。运行最新的 7.7.0+1
在这个例子中,我添加了 firebase_core: 0.7.0,我也试过不使用它,但是这个精确配置的唯一匹配是 0.7.0 否则它是依赖项不匹配。
颤振医生:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, 2.1.0-11.0.pre.145, on macOS 11.2.1 20D75 darwin-x64, locale en-SE)
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
✗ Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.0)
[✓] IntelliJ IDEA Community Edition (version 2020.3.2)
[✓] IntelliJ IDEA Community Edition (version 2020.3.2)
[✓] Connected device (2 available)
! Doctor found issues in 1 category.
如前所述,我也尝试过稳定版和开发版。
有什么想法吗?我真的被困住了。