googleads/googleads-mobile-android-examples

Lateinit property appOpenAdManager has not been assigned

Closed this issue · 6 comments

I just downloaded the project from Git and running the project right away gives the following crash:

FATAL EXCEPTION: main Process: com.google.android.gms.example.appopenexample, PID: 26256 kotlin.UninitializedPropertyAccessException: lateinit property appOpenAdManager has not been initialized at com.google.android.gms.example.appopenexample.MyApplication.loadAd(MyApplication.kt:93) at com.google.android.gms.example.appopenexample.SplashActivity.initializeMobileAdsSdk(SplashActivity.kt:104) at com.google.android.gms.example.appopenexample.SplashActivity.onCreate$lambda-0(SplashActivity.kt:46) at com.google.android.gms.example.appopenexample.SplashActivity.$r8$lambda$wNXKAfm7T91NN5R0TRz1B-2iKco(Unknown Source:0) at com.google.android.gms.example.appopenexample.SplashActivity$$ExternalSyntheticLambda0.consentGatheringComplete(D8$$SyntheticClass:0) at com.google.android.gms.example.appopenexample.GoogleMobileAdsConsentManager.gatherConsent$lambda-1$lambda-0(GoogleMobileAdsConsentManager.kt:63) at com.google.android.gms.example.appopenexample.GoogleMobileAdsConsentManager.$r8$lambda$kxDmfZRKy0TR2lF2ZXQVrVWKty0(Unknown Source:0) at com.google.android.gms.example.appopenexample.GoogleMobileAdsConsentManager$$ExternalSyntheticLambda2.onConsentFormDismissed(D8$$SyntheticClass:0) at com.google.android.ump.UserMessagingPlatform.loadAndShowConsentFormIfRequired(com.google.android.ump:user-messaging-platform@@2.2.0:2) at com.google.android.gms.example.appopenexample.GoogleMobileAdsConsentManager.gatherConsent$lambda-1(GoogleMobileAdsConsentManager.kt:61) at com.google.android.gms.example.appopenexample.GoogleMobileAdsConsentManager.$r8$lambda$mM8Tm_wQ0p01b3w1rmxTfZSOyxU(Unknown Source:0) at com.google.android.gms.example.appopenexample.GoogleMobileAdsConsentManager$$ExternalSyntheticLambda0.onConsentInfoUpdateSuccess(D8$$SyntheticClass:0) at com.google.android.gms.internal.consent_sdk.zzt.run(Unknown Source:2) at android.os.Handler.handleCallback(Handler.java:958) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:230) at android.os.Looper.loop(Looper.java:319) at android.app.ActivityThread.main(ActivityThread.java:8893) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)

facing the same issue

Same issue also. I try donloaded project and code in my app but both crashing. traying to implement app open adsd for month i hope this code will fix disruptive policy from google play store

Resetting to 0feec49 revision (0feec49 Nicholas Ventimiglia nventimiglia@google.com on 2024-05-14 at 4:12 p.m.) helps.

同样的问题

@halls

@SaimaUsman0333

Is this still an Issue? The current code in github is similar to pull request #713

@NVentimiglia looks good now. It's a pity though that #713 pull request has not been used for the fix.