「FlutterアプリにFirebaseを追加するときハマったこと」を参考に、Runner/Runner ディレクトリにXcodeでGoogleService-Info.plistを追加しましたが、「fatal error: module 'firebase_admob' not found」エラーでビルドできませんでした。
解決方法をご教示いただけますと幸いです。
Running pod install... Running Xcode build... Xcode build done. 6.0s Failed to build iOS app Error output from Xcode build: ↳ objc[21957]: Class AMSupportURLConnectionDelegate is implemented in both ?? (0x203ca8188) and ?? (0x1149a02b8). One of the two will be used. Which one is undefined. objc[21957]: Class AMSupportURLSession is implemented in both ?? (0x203ca81d8) and ?? (0x1149a0308). One of the two will be used. Which one is undefined. ** BUILD FAILED ** Xcode's output: ↳ /Users/XXX/ios/Runner/GeneratedPluginRegistrant.m:10:9: fatal error: module 'firebase_admob' not found @import firebase_admob; ~~~~~~~^~~~~~~~~~~~~~ 1 error generated. note: Using new build system note: Building targets in parallel note: Planning build note: Constructing build description warning: Capabilities for Signing & Capabilities may not function correctly because its entitlements use a placeholder team ID. To resolve this, select a development team in the Runner editor. (in target 'Runner' from project 'Runner') Could not build the application for the simulator. Error launching application on iPhone 12 Pro Max.
実行環境
% flutter doctor -v [✓] Flutter (Channel beta, 1.25.0-8.3.pre, on macOS 11.2 20D64 darwin-arm, locale ja-JP) • Flutter version 1.25.0-8.3.pre at /Users/libs/flutter • Framework revision 5d36f2e7f5 (3 weeks ago), 2021-01-14 15:57:49 -0800 • Engine revision 7a8f8ca02c • Dart version 2.12.0 (build 2.12.0-133.7.beta) [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3) • Android SDK at /Users/XXX/Library/Android/sdk • Platform android-30, build-tools 30.0.3 • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 12.4, Build version 12D4e • CocoaPods version 1.10.0 [✓] Android Studio (version 4.1) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: ???? https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: ???? https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495) [✓] VS Code (version 1.52.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension can be installed from: ???? https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter [✓] Connected device (1 available) • iPhone 12 Pro Max (mobile) • 2AF7F633-95F8-43E8-89F1-385EE2463093 • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator) • No issues found!
pabspec.yaml
name: test description: A new Flutter application. publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+100 environment: sdk: ">=2.7.0 <3.0.0" dependencies: flutter: sdk: flutter cupertino_icons: ^1.0.1 url_launcher: firebase_core: firebase_admob: ^0.10.3 flutter_launcher_icons: any dev_dependencies: flutter_test: sdk: flutter integration_test: sdk: flutter flutter: uses-material-design: true assets: - assets/images/
あなたの回答
tips
プレビュー