title: App ID problems with firebase_admob 0.6.1 for flutter
body: <p>I've created a new android app in admob, I've got the id, and I tried using it in the example on the firebase_admob page.</p>
  
  <p>I've added the latest version in a default flutter project and I copied and pasted the code on the page. I only modified the id, I've tried single quotes, I've tried double quotes, with no avail, I've got the same error in the console.</p>
  
  <p>What do I do wrong? I really don't get it, I've spend all day trying to figgure this out. Please help me.</p>
  
  <p>getGoogleAppId failed with exception: java.lang.IllegalStateException: Initialize must be called before getGoogleAppId.: com.google.android.gms.measurement.AppMeasurement.getGmpAppId(Unknown Source:0)</p>
  
  <p>I also get the error </p>
  
  <p>GoogleService failed to initialize, status: 10, Missing google app id value from from string resources with name google_app_id.</p>
  
  <p>and </p>
  
  <p>Missing google_app_id. Firebase Analytics disabled. See ...</p>
  
  <p>This is the code:</p>
  
  <pre><code>import 'package:flutter/material.dart';
  import 'package:firebase_admob/firebase_admob.dart';
  
  // You can also test with your own ad unit IDs by registering your device as     a
  // test device. Check the logs for your device's ID value.
  const String testDevice = 'YOUR_DEVICE_ID';
  
  class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() =&gt; new _MyAppState();
  }
  
  class _MyAppState extends State&lt;MyApp&gt; {
  
  static final MobileAdTargetingInfo targetingInfo = new MobileAdTargetingInfo(
  testDevices: testDevice != null ? &lt;String&gt;[testDevice] : null,
  keywords: &lt;String&gt;['foo', 'bar'],
  contentUrl: 'http://foo.com/bar.html',
  birthday: new DateTime.now(),
  childDirected: true,
  gender: MobileAdGender.male,
  nonPersonalizedAds: true,
  );
  
  BannerAd _bannerAd;
  InterstitialAd _interstitialAd;
  
  int _coins = 0;
  
  BannerAd createBannerAd() {
  return new BannerAd(
  adUnitId: BannerAd.testAdUnitId,
  size: AdSize.banner,
  targetingInfo: targetingInfo,
  listener: (MobileAdEvent event) {
  print("BannerAd event $event");
  },
  );
  }
  
  InterstitialAd createInterstitialAd() {
  return new InterstitialAd(
    adUnitId: InterstitialAd.testAdUnitId,
    targetingInfo: targetingInfo,
    listener: (MobileAdEvent event) {
      print("InterstitialAd event $event");
    },
  );
  }
  
  @override
  void initState() {
  super.initState();
  FirebaseAdMob.instance
      .initialize(appId: 'ca-app-pub-0463943530925483~4865006927');
  _bannerAd = createBannerAd()..load();
  RewardedVideoAd.instance.listener =
      (RewardedVideoAdEvent event, {String rewardType, int rewardAmount}) {
    print("RewardedVideoAd event $event");
    if (event == RewardedVideoAdEvent.rewarded) {
      setState(() {
        _coins += rewardAmount;
      });
    }
  };
  }
  
  @override
  void dispose() {
  _bannerAd?.dispose();
  _interstitialAd?.dispose();
  super.dispose();
  }
  
  
  @override
  Widget build(BuildContext context) {
  return new MaterialApp(
    home: new Scaffold(
      appBar: new AppBar(
        title: const Text('AdMob Plugin example app'),
      ),
      body: new SingleChildScrollView(
        child: new Center(
          child: new Column(
            crossAxisAlignment: CrossAxisAlignment.center,
            mainAxisSize: MainAxisSize.min,
            children: &lt;Widget&gt;[
              new RaisedButton(
                  child: const Text('SHOW BANNER'),
                  onPressed: () {
                    _bannerAd ??= createBannerAd();
                    _bannerAd
                      ..load()
                      ..show();
                  }),
              new RaisedButton(
                  child: const Text('REMOVE BANNER'),
                  onPressed: () {
                    _bannerAd?.dispose();
                    _bannerAd = null;
                  }),
              new RaisedButton(
                child: const Text('LOAD INTERSTITIAL'),
                onPressed: () {
                  _interstitialAd?.dispose();
                  _interstitialAd = createInterstitialAd()..load();
                },
              ),
              new RaisedButton(
                child: const Text('SHOW INTERSTITIAL'),
                onPressed: () {
                  _interstitialAd?.show();
                },
              ),
              new RaisedButton(
                child: const Text('LOAD REWARDED VIDEO'),
                onPressed: () {
                  RewardedVideoAd.instance.load(
                      adUnitId: RewardedVideoAd.testAdUnitId,
                      targetingInfo: targetingInfo);
                },
              ),
              new RaisedButton(
                child: const Text('SHOW REWARDED VIDEO'),
                onPressed: () {
                  RewardedVideoAd.instance.show();
                },
              ),
              new Text("You have $_coins coins."),
            ].map((Widget button) {
              return new Padding(
                padding: const EdgeInsets.symmetric(vertical: 16.0),
                child: button,
              );
            }).toList(),
          ),
        ),
      ),
    ),
  );
  }
  }
  
  void main() {
  runApp(new MyApp());
  }
  </code></pre>