Open krobawsky opened 4 years ago
The app works fine, but when I add the dependencie in the pubspec.yaml file the app start slow and close. I don't konw what's goin on.
Did you follow the install instructions?
@kmcgill88 I also fetch same problem. When I add it in pubspec.yml, my app is going crashed!
I had the same problem. I fixed it by making sure I had the app unit id in the manifest file. I accidentally placed the ad unit id. Make sure that the manifest file (if making an android app) and the info.plist (if making an ios app) have a ~ in the middle instead of the /. The app unit id will have a ~ in the middle of it. You can find the app unit id on the AdMob site. It should look something like this: ca-app-pub-3940256099942544~3347511713. I hope this helps!
I had the same problem too and it was caused by my mistake in the manifest file. I'm working on Android. In the AndroidManifest.xml, I wrongly put the \<meta-data> tag under the \<activity> tag as below and it should be directly under the \<application> tag:
<application
android:name="io.flutter.app.FlutterApplication"
...
>
<!-- CORRECT!!! -->
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-xxxxxxxxxxx~xxxxxxxxxxxxxx"/>
<!-- CORRECT!!! -->
<activity
android:name=".MainActivity"
...
>
<meta-data
android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
android:value="true" />
<!-- WRONG !!! -->
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-xxxxxxxxxxx~xxxxxxxxxxxxxx"/>
<!-- WRONG !!! -->
...
</activity>
</application>
@krobawsky did @takekapp1990 suggestion work for you?
@kmcgill88 I think you should add the installation instructions in the flutter package page and in the main README page of this repository.
@usavas I've bee very just and haven't been able to work on his project. PR'S are very welcome.
I had a same issue! Solved! thanks @takekapp1990
Can you give us more info about your issue @krobawsky ?