【问题标题】:Android Consent Information publisher misconfigurationAndroid 同意信息发布者配置错误
【发布时间】:2020-12-03 22:08:03
【问题描述】:

我尝试将 Google 同意与用户消息传递平台一起使用,以在 Android 应用同意表单中显示。我遵循此文档https://developers.google.com/admob/ump/android/quick-start

我收到此错误:

onConsentInfoUpdateFailure: Publisher misconfiguration: Failed to read publisher's account configuration; please check your configured app ID. Received app ID: `ca-app-pub-XXXXXXXXXXXXXXXX~XXXXXXXXXX`.

我的代码:

ConsentRequestParameters params;

    if (testingGDPR) {

        ConsentDebugSettings debugSettings = new ConsentDebugSettings.Builder(this)
                .setDebugGeography(ConsentDebugSettings.DebugGeography.DEBUG_GEOGRAPHY_EEA)
                .addTestDeviceHashedId(getString(R.string.ADMOB_REAL_DEVICE_HASH_ID_FOR_TESTING))
                .build();

        params = new ConsentRequestParameters.Builder().setConsentDebugSettings(debugSettings).build();
    } else {
        params = new ConsentRequestParameters.Builder().build();
    }

    consentInformation = UserMessagingPlatform.getConsentInformation(this);

    if (testingGDPR) {
        consentInformation.reset();
    }

    consentInformation.requestConsentInfoUpdate(
            this,
            params,
            new ConsentInformation.OnConsentInfoUpdateSuccessListener() {
                @Override
                public void onConsentInfoUpdateSuccess() {
                    
                    if (consentInformation.isConsentFormAvailable() && consentInformation.getConsentStatus() == ConsentInformation.ConsentStatus.REQUIRED) {
                        loadForm();
                    } else {
                        setupAds();
                    }
                }
            },
            new ConsentInformation.OnConsentInfoUpdateFailureListener() {
                @Override
                public void onConsentInfoUpdateFailure(FormError formError) {
                    Log.d("gdpr", "onConsentInfoUpdateFailure, code:" + formError.getErrorCode() + ", " + formError.getMessage());
                }
            });

【问题讨论】:

  • Funding Choices 帐户是否与您的 AdMob 帐户相关联。?
  • @AmodGokhale 是的,我已经链接它并在 Admob 中设置了阻止控制。
  • 你的问题解决了吗?

标签: java android admob gdprconsentform user-messaging-platform


【解决方案1】:

TestDeviceHashedId 与 Admob 设备 ID 不同。 所以删除这一行:

.addTestDeviceHashedId(getString(R.string.ADMOB_REAL_DEVICE_HASH_ID_FOR_TESTING))

然后运行您的代码并检查日志。您应该使用的 TestDeviceHashedId 将会出现。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-03-17
    • 1970-01-01
    • 1970-01-01
    • 2014-11-21
    • 1970-01-01
    • 2018-07-18
    • 1970-01-01
    • 2013-06-21
    相关资源
    最近更新 更多