奖励视频广告-无法加载广告错误代码3 admob
问题描述:
我坚持实施AdMob Rewarded Video 3天了,代码完全可以找到,但是当我启动该应用程序时,它说"onRewardedVideoAdFailedToLoad"并显示错误代码3,并且广告无法正常显示,请帮我做什么?
I stuck for 3 days on implementing AdMob Rewarded Video , the code is completely find but when I launch the app it's said "onRewardedVideoAdFailedToLoad" and getting error code 3 and ad won't display kindly please help me what i do?
答
错误代码为3表示广告请求成功,但由于缺少广告资源而没有退回任何广告.
Error code is 3 stand for the ad request was successful, but no ad was returned due to lack of ad inventory.
您可以实现此小功能以获取有关错误代码的知识.
You can implement this small function to get the knowledge of error code.
private int getAdMobErrorCode(SampleErrorCode errorCode) {
switch (errorCode) {
case BAD_REQUEST:
return AdRequest.ERROR_CODE_INVALID_REQUEST;
case NETWORK_ERROR:
return AdRequest.ERROR_CODE_NETWORK_ERROR;
case NO_INVENTORY:
return AdRequest.ERROR_CODE_NO_FILL;
case UNKNOWN:
default:
return AdRequest.ERROR_CODE_INTERNAL_ERROR;
}
}