【发布时间】:2020-10-01 19:37:12
【问题描述】:
我有一个运行良好的颤振应用程序。我正在更新我的颤振版本和一些插件的版本(在最新的 XCode 版本 11 上)。我无法再构建我的应用程序,因为发生以下两种情况之一:
1) 如果我没有“use_modular_headers!”在我的 podfile 中,尝试运行 pod install 时出现此错误:
The Swift pod `DKPhotoGallery` depends upon `SDWebImage`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.
2) 如果我添加“use_modular_headers!”到 podfile,然后我可以成功安装 podfile,但是在构建时失败并出现此错误:
fatal error: module map file '/Users/mbpro/Documents/Perkl/ios/Pods/Headers/Private/openssl_grpc/BoringSSL-GRPC.modulemap' not found
我发现的第二个错误是因为 GRPC 不支持模块化标题。这就是我卡住的地方,因为由于颤振从 pubspec 动态生成 podfile 的方式,模块化标头似乎是全局打开或关闭的,我无法专门为特定 pod 打开模块化标头。
这是我的 pubspec 依赖项列表:
cloud_firestore: 0.13.6
firebase_auth: 0.16.1
firebase_core:
firebase_database:
firebase_storage:
firebase_messaging:
google_sign_in:
image_picker:
image_cropper:
intl:
flutter_sound:
flutter_launcher_icons:
flushbar:
file_picker:
path_provider:
#audioplayers:
provider:
sliding_up_panel:
font_awesome_flutter:
marquee:
对此的任何帮助将不胜感激!它完全关闭了我的开发,因为升级后我无法构建来测试任何东西。
编辑:Flutter Doctor -v 输出(一切看起来都很好)
[✓] Flutter (Channel stable, v1.17.3, on Mac OS X 10.15.5 19F101, locale en-US)
• Flutter version 1.17.3 at /Users/mbpro/Downloads/flutter
• Framework revision b041144f83 (8 days ago), 2020-06-04 09:26:11 -0700
• Engine revision ee76268252
• Dart version 2.8.4
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /Users/mbpro/Library/Android/sdk
• Platform android-29, build-tools 29.0.2
• Java binary at: /Applications/Android
Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
1.8.0_202-release-1483-b49-5587405)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.5)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.5, Build version 11E608c
• CocoaPods version 1.9.3
[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 44.0.1
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build
1.8.0_202-release-1483-b49-5587405)
[✓] Connected device (1 available)
• iPhone SE (2nd generation) • 9FC22937-91AB-4F22-BB1E-20FFB1CAF4C8 • ios •
com.apple.CoreSimulator.SimRuntime.iOS-13-5 (simulator)
• No issues found!
【问题讨论】:
-
您可以运行“颤振医生”并将结果粘贴到您的问题中吗?
-
我进行了编辑,但 flutter doctor 中的一切似乎都很好。似乎我的一个 dart 插件使用了一个不能使用模块化标题的 iOS 框架,而另一个使用需要使用模块化标题的 iOS 库。但是通过 Flutter 设置 podfile 的方式,你不能只告诉某些 pod 使用模块化标题
标签: ios flutter flutter-dependencies podfile