Skip to content
This repository has been archived by the owner on Aug 13, 2022. It is now read-only.

Fatal Exception: android.content.res.Resources$NotFoundException (Android 5 and 5.1 issue) #115

Open
ArLabDev opened this issue Dec 29, 2020 · 0 comments

Comments

@ArLabDev
Copy link

Exception reported on several devices. (resource ID may change: #0x2040002, #0x2040003, #0x3040002, #0x3040005)
with 'com.google.android.ads.consent:consent-library:1.0.8'

Fatal Exception: android.content.res.Resources$NotFoundException
String resource ID #0x3040005
android.content.res.HwResources.getText (HwResources.java:1326)
com.google.ads.consent.ConsentForm$Builder.build (ConsentForm.java:210)

Here how ConsentForm is called:

            mConsentForm = new com.google.ads.consent.ConsentForm.Builder(mCurrentActivity, new URL(getResources().getString(R.string.privacy_link)) )
                .withListener(new com.google.ads.consent.ConsentFormListener()
                {
                    @Override
                    public void onConsentFormLoaded()
                    {
                        // Consent form has loaded successfully, now show it
                        mConsentForm.show();
                    }

                    @Override
                    public void onConsentFormOpened()
                    {
                        // Consent form was displayed.
                    }

                    @Override
                    public void onConsentFormClosed(
                        com.google.ads.consent.ConsentStatus consentStatus, Boolean userPrefersAdFree )
                    {
					    // [Omissis] Our code...

                        mConsentForm = null;
                    }

                    @Override
                    public void onConsentFormError( String errorDescription )
                    {
                        // Consent form error. Would be nice to have some proper logging
                        Log.e( TAG, "onConsentFormError: "+errorDescription );

					    // [Omissis] Our code...
                    }
                })
                .withPersonalizedAdsOption()
                .withNonPersonalizedAdsOption()
                .withAdFreeOption()
                .build();
            mConsentForm.load();

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant