用的是测试id,在测试admob广告的时候一直获取不到,然后新建了一个demo,将代码拷贝过去,是可以获取到的并且展示的,所以代码方面应该没有问题的
出现了如下的异常:
W/GooglePlayServicesUtil: Google Play services out of date for com.xxx.app. Requires 212800000 but found 201817022
W/Ads: Not retrying to fetch app settings
W/GoogleApiManager: The service for com.google.android.gms.internal.appset.zzd is not available: ConnectionResult{statusCode=SERVICE_VERSION_UPDATE_REQUIRED, resolution=null, message=null}
D/AppOpenManager: onAdFailedToLoad: 加载开屏广告失败 {
"Code": 0,
"Message": "Received error HTTP response code: 400",
"Domain": "com.google.android.gms.ads",
"Cause": "null",
"Response Info": {
"Response ID": "null",
"Mediation Adapter Class Name": "",
"Adapter Responses": []
}
}
I/Ads: Ad failed to load : 0
E/chromium: [ERROR:cookie_manager.cc(137)] Strict Secure Cookie policy does not allow setting a secure cookie for http://googleads.g.doubleclick.net/ for apps targeting >= R. Please either use the 'https:' scheme for this URL or omit the 'Secure' directive in the cookie value.
注意:out of date,是不是手机的时间错误了,同步下时间吧。