简体   繁体   English

Flutter-Android Manifest中的语法,支持AdMob

[英]Flutter - Syntax in Android Manifest for AdMob support

I have seen that now, to use AdMob into android app, it is mandatory to include the following lines into the AndroidManifest.xml 我已经知道,要将AdMob用于android应用中,必须在AndroidManifest.xml添加以下几行

<meta-data
     android:name="com.google.android.gms.ads.APPLICATION_ID"
     android:value="ca-app-pub-xxxxxxxxxxx~xxxxxxxxxxxx" />

My question is : am I suppose to replace "APPLICATION_ID" with my application id (package name) or just leave it like this ? 我的问题是:我是否应该将“ APPLICATION_ID”替换为我的应用程序ID(程序包名称)还是像这样保留它?

I have tried both possibilities, but I always receive Ad failed to load : 3 我尝试了两种可能性,但始终收到Ad failed to load : 3

It's like a key and value, so it will be liked that 这就像一个关键和价值,所以会被喜欢

<meta-data
 android:name="com.google.android.gms.ads.APPLICATION_ID"
 android:value="YOUR_APP_ID_HERE" />

Change the value of YOUR_APP_ID_HERE to your application id, it will be something like that ca-app-pub-xxxxxxxxxxx~xxxxxxxxxxxx YOUR_APP_ID_HERE的值更改为您的应用程序ID,将类似于ca-app-pub-xxxxxxxxxxx~xxxxxxxxxxxx

Where you can find it? 在哪里可以找到它? From AdMob website after making an account, you will be able to create new application, after the creation, you will get the app id, copy and paste it. 创建帐户后,您可以从AdMob网站创建新应用,创建后,您将获得应用ID,然后将其复制并粘贴。

Hope my answer helps you. 希望我的回答对您有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM