问题
i work with flutter project and add admob ads . i use firbas-admob from pub div . all well and build success . after that app crash and show this error in picture. how solve that please
回答1:
Happened to me also: the app was crashing after opening. Then encountered this on firebase_admob package:
AdMob 17 requires the App ID to be included in the AndroidManifest.xml
. Failure to do so will result in a crash on launch of your app. The line should look like:
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="[ADMOB_APP_ID]"/>
I've changed [ADMOB_APP_ID]
to my admob ID ("of course you did, it is self-explanatory from its name"), added that code to AndroidManifest.xml
and then app stopped crashing.
回答2:
i had the same issue too. but at the end, the problem was, that i didn't add the Google Service file from Firebase to the project, as it's seems to be required (by the plugin), like mentioned here
来源:https://stackoverflow.com/questions/59826285/flutter-admob-build-success-but-then-crash