我想从 Admob 切换到 Amazon Ads,所以我基本上已经完成了官方指南中描述的所有事情。
https://developer.amazon.com/sdk/mobileads/quick-start.html
- 用 amazon 替换了 admob xml 布局
- 在父布局中包含 xmlns 命名空间
- 设置所有权限清单
- 在清单中设置 AdActivity
- 设置应用程序密钥
- 设置 AdTargetingOptions
广告没有炫耀,因为它们似乎确定了错误的尺寸。
这是日志
07-29 10:03:14.948 30966-30966/de.android.contacts D/AmazonMobileAds Configuration: Setting country configuration to United States.
07-29 10:03:14.948 30966-30966/de.android.contacts D/AmazonMobileAds Configuration: Country code set to us
07-29 10:03:14.948 30966-30966/de.android.contacts D/AmazonMobileAds Configuration: Setting configuration endpoints to North America.
07-29 10:03:14.948 30966-30966/de.android.contacts D/AmazonMobileAds Configuration: Region set to na
07-29 10:03:18.623 31130-31134/com.rectangularsoftware.stackanywhere D/dalvikvm: Debugger has detached; object registry had 1 entries
07-29 10:03:18.668 30966-30966/de.android.contacts D/AmazonMobileAds AdLayout: Ad size to be determined automatically.
07-29 10:03:34.558 2236-2318/system_process D/lights: set_light_buttons off
07-29 10:03:38.668 30966-31146/de.android.contacts E/AmazonMobileAds AdLayout: Can't load an ad because the view size cannot be determined.
07-29 10:03:38.668 30966-31146/de.android.contacts D/AmazonMobileAds AdController: adFailed
07-29 10:03:38.673 30966-30966/de.android.contacts D/AmazonMobileAds AdController: Default ad listener called - Ad Failed to Load. Error code: REQUEST_ERROR, Error Message: Can't load an ad because the view size cannot be determined.
国家代码也是错误的,在我的情况下应该是德国。
什么可能导致这个问题?