Flutter : admob build success but then crash

好久不见. 提交于 2020-04-30 08:31:22

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!