加载广告3失败

时间:2020-08-04 18:23:47

标签: android admob ads

我正在使用已经正常工作的AdunitId和错误代码3。 带有此AduntId的其他应用程序运行正常。 这是我的代码。

function translate(string) {
    // body...
    //1.0 split the string i am going to work with and set it to a variable
    let word = string.split("");
    console.log(word);
    //1.1 create the regular expression
    const vowelRegex = /[aeiou]/;
    console.log(vowelRegex);

    //1.2 compare if the first letter of the string matches the vowelRegex
    //meaning that if the string matches any of the vowels of the regex
    if (vowelRegex.test(string[0])) {
        return `${string}way`;
    }
    while (true) {
        if (!vowelRegex.test(word[0])) {
            const firstconsonant = word.splice(0, 1)[0];
            word.push(firstconsonant);
        } else {
            break;
        }
    }
    string = `${word.join("")}ay`;
    return string;
}

console.log(translate("apple"));
console.log(translate("banana"));
console.log(translate("cherry"));
console.log(translate("eat pie"));
console.log(translate("three"));
console.log(translate("school"));
console.log(translate("quiet"));
console.log(translate("square"));
console.log(translate("the quick brown fox"));

1 个答案:

答案 0 :(得分:0)

错误代码3:ERROR_CODE_NO_FILL

说明(Dev Docs链接):广告请求成功,但由于缺少广告资源而没有退回任何广告。

为什么会发生:广告客户可以根据业务相关性来定位特定区域,平台和用户个人资料,这有时会导致特定区域或用户个人资料的广告可用性降低。错误代码表明实施是正确的,并且由于在从应用发送广告请求的那个特定时间缺乏合适的广告的可用性,因此未填写广告请求。

如果遇到此错误,则您的代码正确。问题是AdMob并非总是有一个广告可为每个请求返回。特别是在您刚刚注册了AdMob发布商ID的情况下,可能会发生这种情况,因为新ID开始返回广告需要一些时间和多次请求。

填充率较低的另一个原因是您没有启用AdSense补余,或者您滤除了一些广告。检查您的应用设置,看是否是这种情况。

Error code 3 docs

您可以添加.setTestMode(True),以便了解其工作原理

您可以找到有关搜索的方式