【问题标题】:My app shows test ads but no real ads (AdMob Google)我的应用显示测试广告,但没有实际广告 (AdMob Google)
【发布时间】:2017-12-07 10:09:13
【问题描述】:

我使用 Android Studio 创建了一个应用。完成后,我添加了广告,然后将其发布到 Play 商店。它在大约 10 天内确实运行良好。谷歌因误解将我的应用程序从商店中删除(我已经支付了他们的版权),所以我提出上诉,他们恢复了它。在应用程序不在 Play Store 上的时间(3 天),广告仍然显示在我的手机上。他们恢复我的应用几天后,广告停止显示,直到现在。

我什么都试过了,ID Units 写得很好。我创建了一个新的 ID 横幅,它是一样的。测试广告出现但不是真正的广告。

logcat 如下(用词“gms”过滤,广告库)。

PDT:我有依赖和所有需要的东西。请记住,它运行良好,然后突然不行了。

12-07 10:18:56.726 22503-22097/? W/ctxmgr: [EventHandler]Dropping runnable, delay=9223370524216439082, runnable=dbe@d4e7bc, workInfo=pkg=com.google.android.gms, lbl=FenceScheduler, start=unspec, stop=unspec
12-07 10:18:56.977 32342-32431/? E/GmsUtils: Failed to connect to Google API client: ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null, message=null}
12-07 10:18:59.854 32342-32444/? E/GmsUtils: Failed to connect to Google API client: ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null, message=null}
12-07 10:19:01.425 32092-32092/? W/Finsky: [1] com.google.android.finsky.wear.al.run(9): Dropping command=send_installed_apps due to Gms not connected
12-07 10:19:36.226 22480-25542/? I/Icing: IndexChimeraService.getServiceInterface callingPackage=com.google.android.gms componentName=people serviceId=32
12-07 10:23:24.579 1410-2604/? W/ActivityManager: Unable to start service Intent { act=com.google.android.gms.measurement.START pkg=com.google.android.gms } U=999: not found
12-07 10:23:24.582 2267-2318/? E/GmsClient: unable to connect to service: com.google.android.gms.measurement.START on com.google.android.gms

【问题讨论】:

  • 请发布您添加的依赖项。
  • //GOOGLE ADS compile 'com.google.android.gms:play-services-ads:11.6.0' //RATE MY APP compile 'com.codemybrainsout.rating:ratingdialog:1.0.8 ' compile('com.google.apis:google-api-services-youtube:v3-rev187-1.23.0') { 排除组: 'org.apache.httpcomponents' } 编译 'com.android.support:multidex:1.0 .0'implementation "io.reactivex.rxjava2:rxjava:2.1.6" implementation 'io.reactivex.rxjava2:rxandroid:2.0.1' compile('com.google.api-client:google-api-client-android: 1.23.0') { 排除组:'org.apache.httpcomponents' }
  • 确保您在 adsmob 网站上添加了 playstore 链接。

标签: android admob


【解决方案1】:

我建议您先检查您的 AdMob 帐户。您的旧广告单元 ID 可能已被撤消,您可能需要创建一个新 ID。

之后,您可以检查您的 XML 布局中是否有正确的 adUnitId(不是测试 ID)。

    <com.google.android.gms.ads.AdView xmlns:ads="http://schemas.android.com/apk/res-auto"
        ads:adSize = "BANNER"
        ads:adUnitId = "ca-app-pub-###/###"/>

【讨论】:

    【解决方案2】:

    谢谢你的回答。最后是 AdMob 帐户的问题。如果测试 ID 有效,并且常规 ID 没有,则帐户有问题(计算您没有使用 TestDevice 或 ID 写入正确)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-05-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-06-21
      • 1970-01-01
      相关资源
      最近更新 更多