Android Question GoogleMobileAds error: java.lang.NoSuchFieldError: No static field SEARCH of type Lcom/google/android/gms/ads/AdSize; in class Lcom/google/android/gms

WebQuest

Active Member
Licensed User
Longtime User
Before updating b4a to version 13.40, everything worked fine, but now I get this error message:
error:
Logger connesso a:  samsung SM-S931B
--------- beginning of main
Copying updated assets files (1)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create (first time) **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = true **
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create (first time) **
java.lang.NoSuchFieldError: No static field SEARCH of type Lcom/google/android/gms/ads/AdSize; in class Lcom/google/android/gms/ads/AdSize; or its superclasses (declaration of 'com.google.android.gms.ads.AdSize' appears in /data/app/~~Y-y0DnUxvhxvNN4AsL9PBg==/com.memory.android-JQ2X9N_LTv8C7ZHO6mCOdg==/base.apk)
    at com.khaan.googleadssdk.AdViewWrapper.<clinit>(AdViewWrapper.java:69)
    at com.memory.android.main._loadad(main.java:453)
    at com.memory.android.main._activity_create(main.java:436)
    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:157)
    at com.memory.android.main.afterFirstLayout(main.java:105)
    at com.memory.android.main.access$000(main.java:17)
    at com.memory.android.main$WaitForLayout.run(main.java:83)
    at android.os.Handler.handleCallback(Handler.java:959)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loopOnce(Looper.java:257)
    at android.os.Looper.loop(Looper.java:342)
    at android.app.ActivityThread.main(ActivityThread.java:9579)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:619)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:929)
** Activity (main) Resume **

Someone else has encountered this problem with the GoogleMobileAds v.1.0 library. My problem is that my apps no longer work. I used FaribaseAdmob2 and followed the examples, but the banners do not appear in production.
 

asales

Expert
Licensed User
Longtime User
1 - Don't use GoogleMobileAds.
2 - Check if the SDK is the recommended to the B4A 13.40.
3 - Check this example (I use it in all my apps):
 
Upvote 0
Top