使用用于Flutter的firebase_admob插件时找不到FirebaseAdMobPlugin.h文件

时间:2018-03-25 08:17:07

标签: flutter

使用iOS插件时,我无法在firebase_admob模拟器上构建。
我可以在Android上构建。

控制台日志:

=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
/Users/rkowase/StudioProjects/stopwatch/ios/Runner/GeneratedPluginRegistrant.m:6:9: fatal error: 'firebase_admob/FirebaseAdMobPlugin.h' file not found
#import <firebase_admob/FirebaseAdMobPlugin.h>
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
    Could not build the application for the simulator.
    Error launching application on iPhone X.

扑医生

$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v0.1.5, on Mac OS X 10.12.6 16G1114, locale en-JP)
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 9.2)
[✓] Android Studio (version 3.0)
[✓] Connected devices (2 available)

• No issues found!

pubspec.yaml

dependencies:
  flutter:
    sdk: flutter
  firebase_admob:

我使用firebase_admob v0.5.0
https://pub.dartlang.org/packages/firebase_admob

示例代码 https://github.com/rkowase/flutter-firebase-admob-sample

1 个答案:

答案 0 :(得分:0)

我通过执行this解决方法解决了这个问题。

链接

“Made Podfiles使用符号链接到本地​​pod”无法正常工作·问题#15099·flutter / flutter https://github.com/flutter/flutter/issues/15099

目标c - Swift编译器错误:“框架模块内部的非模块化头” - Stack Overflow Swift compiler error: "non-modular header inside framework module"

在iOS版本中找不到PathProvider - Google网上论坛 https://groups.google.com/forum/#!msg/flutter-dev/7QRk1RphLDE/5rLS4CciBwAJ