Android Question Firebase Admob 2 and Consent Error

tufanv

Expert
Licensed User
Hello,

Tutorial topic says that we can use consent manager as it was in firebase admob old library. But I am getting an error after running the app. for this line :

B4X:
If consent.IsRequestLocationInEeaOrUnknown Then

Error:

B4X:
Logger connected to:  realme RMX2001
--------- beginning of main
Copying updated assets files (1)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
Error occurred on line: 0 (Main)
java.lang.ClassNotFoundException: ct$canlidoviz$main$MyAdListener
    at java.lang.Class.classForName(Native Method)
    at java.lang.Class.forName(Class.java:454)
    at java.lang.Class.forName(Class.java:379)
    at anywheresoftware.b4j.object.JavaObject.getCorrectClassName(JavaObject.java:274)
    at anywheresoftware.b4j.object.JavaObject.InitializeNewInstance(JavaObject.java:84)
    at ct.canlidoviz.main$ResumableSub_LoadUnifiedNativeAd.resume(main.java:1489)
    at ct.canlidoviz.main._loadunifiednativead(main.java:1423)
    at ct.canlidoviz.main._activity_create(main.java:1101)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
    at ct.canlidoviz.main.afterFirstLayout(main.java:111)
    at ct.canlidoviz.main.access$000(main.java:23)
    at ct.canlidoviz.main$WaitForLayout.run(main.java:89)
    at android.os.Handler.handleCallback(Handler.java:883)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loop(Looper.java:227)
    at android.app.ActivityThread.main(ActivityThread.java:7822)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1026)
Caused by: java.lang.ClassNotFoundException: ct$canlidoviz$main$MyAdListener
    ... 24 more
** Activity (main) Resume **
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
User id: 3MH87XJDN
kackere:156
Error occurred on line: 4739 (Main)
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.google.ads.consent.ConsentInformation.isRequestLocationInEeaOrUnknown()' on a null object reference
    at anywheresoftware.b4a.admobwrapper.ConsentManager.getIsRequestLocationInEeaOrUnknown(ConsentManager.java:84)
    at ct.canlidoviz.main._loadad(main.java:1880)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:348)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
    at ct.canlidoviz.main.afterFirstLayout(main.java:111)
    at ct.canlidoviz.main.access$000(main.java:23)
    at ct.canlidoviz.main$WaitForLayout.run(main.java:89)
    at android.os.Handler.handleCallback(Handler.java:883)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loop(Looper.java:227)
    at android.app.ActivityThread.main(ActivityThread.java:7822)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1026)
 
Top