【问题标题】:Android Google AdMob: Could not parse Event FE preflight response BUT I have correctly indicated the Publisher IDAndroid Google AdMob:无法解析事件 FE 预检响应但我已正确指示发布者 ID
【发布时间】:2020-04-24 09:35:11
【问题描述】:
ConsentInformation consentInformation = ConsentInformation.getInstance(that);
                String[] publisherIds = {"pub-XYZYXYZYXYZYXYZXY"};
                consentInformation.requestConsentInfoUpdate(publisherIds, new ConsentInfoUpdateListener() {
                    @Override
                    public void onConsentInfoUpdated(ConsentStatus consentStatus) {
                        Consent consent = new Consent();
                        if(!ConsentInformation.getInstance(that).isRequestLocationInEeaOrUnknown()) {
                            consentCallback(that, new AdRequest.Builder().build());
                        } else {
                            if(consentStatus == ConsentStatus.NON_PERSONALIZED) {
                                Bundle extras = new Bundle();
                                extras.putString("npa", "1");
                                AdRequest adRequest = new AdRequest.Builder().addNetworkExtrasBundle(AdMobAdapter.class, extras).build();
                                consentCallback(that, adRequest);
                            } else if(consentStatus == ConsentStatus.PERSONALIZED) {
                                consentCallback(that, new AdRequest.Builder().build());
                            } else if(consentStatus == ConsentStatus.UNKNOWN) {
                                consent.collectConsent(that, miscellaneous, new ConsentInterface() {
                                    @Override
                                    public void callbackConsentInterface(AdRequest adRequest) {
                                        consentCallback(that, adRequest);
                                    }
                                });
                            }
                        }
                    }

如您所见,我已正确指明了我的 Pub ID(在类似问题中突出显示:Android - ConsentInformation - Could not parse Event FE preflight response)。

但是我仍然有这个错误:

W/System.err:无法解析事件 FE 预检响应。

我可以做些什么来修复这个错误?

我确切地说我没有在 Google AdMob 中输入我的银行帐户信息,并且出于严格和技术原因我无法进行测试。

【问题讨论】:

    标签: android firebase admob firebase-admob


    【解决方案1】:

    我通过严格按照我想象的这三个步骤解决了我的问题。我已经测试了它们的几乎所有组合:如果不遵循其中一个步骤,您将收到“无法解析事件”。否则不会出现此错误。

    1. 关注这些文档:https://developers.google.com/admob/android/eu-consent + https://firebase.google.com/docs/admob(“Android 入门”)+ https://developers.google.com/admob(“Android 设置”)

    2. 确保在 Consent API (https://support.google.com/admob/answer/2784578) 的 Publisher IDs 数组中指定您的 Publisher ID

    3. 重要提示:在您的 Google AdMob 帐户 (https://apps.admob.com/v2/payments/settings) 中填写您的付款信息(不是指您的信用卡或任何其他付款方式,而是指您的居住坐标)

    4. 等待

    5. 按照上述文档,创建您的 AdMob“应用”等。

    6. 确保在“屏蔽控制 > 欧盟同意 > 选择广告技术提供商”(https://apps.admob.com/v2/pubcontrols/eu-user-consent) 中选择了一些提供商(通常不可能没有选择)

    7. [Not-Tested but found on the Internet] 在你的 App-Level Gradle 文件中,一定要有:

      minifyEnabled 错误

      proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'

    那么它应该可以工作了。

    【讨论】:

    • 就我而言,您列表的第 7 点解决了我的问题,但这不是我想要的解决方案。因此,我将禁用个性化广告,直到可以重新激活 minify。谢谢你的回答,我找了很久才找到解决办法。
    【解决方案2】:

    如果您的 AdMob 帐户尚未获得批准,则可能会出现该错误。等到“审核中”消息消失后​​再试。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-09-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-05-08
      相关资源
      最近更新 更多