为了账号安全,请及时绑定邮箱和手机立即绑定

如何修复Google移动广告集成错误

如何修复Google移动广告集成错误

jeck猫 2019-04-10 18:15:21
我正在创建一个简单的应用,可以在按下按钮时播放广告。虽然当我尝试初始化Google移动广告SDK时,即使我已经完成Google提供的指南中的每一步,它也会失败。    <application             android:allowBackup="true"             android:icon="@mipmap/ic_launcher"             android:label="@string/app_name"             android:roundIcon="@mipmap/ic_launcher_round"             android:supportsRtl="true"             android:theme="@style/AppTheme"             tools:ignore="GoogleAppIndexingWarning">             <meta-data                 android:name="com.google.android.gms.ads.Application_id"                 android:value="ca-app-pub-################~##########"/>             <activity android:name=".MainActivity">                 <intent-filter>                     <action android:name="android.intent.action.MAIN" />                     <category android:name="android.intent.category.LAUNCHER" />                 </intent-filter>             </activity>         </application>当我尝试运行应用程序时,我得到了这个   ******************************************************************************     * The Google Mobile Ads SDK was initialized incorrectly. AdMob publishers    *     * should follow the instructions here: Link to add a valid  *     * App ID inside the AndroidManifest. Google Ad Manager publishers should     *     * follow instructions here: Link.                           *     ******************************************************************************         at com.google.android.gms.internal.ads.zzabg.attachInfo(Unknown Source:16)         at com.google.android.gms.ads.MobileAdsInitProvider.attachInfo(Unknown Source:3)         at android.app.ActivityThread.installProvider(ActivityThread.java:6724)             ... 10 more
查看完整描述

2 回答

?
慕工程0101907

TA贡献1887条经验 获得超5个赞

设置android:value =“true”

在AdMob的元数据中


查看完整回答
反对 回复 2019-05-15
  • 2 回答
  • 0 关注
  • 1818 浏览

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号