Android Question AdMob Error

gerredtor

Active Member
Licensed User
Hello i have added the code to my Mainfest:

B4X:
'AdMob
AddApplicationText(
<meta-data android:name="com.google.android.gms.version"
  android:value="@integer/google_play_services_version"/>
<activity android:name="com.google.android.gms.ads.AdActivity"
  android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>

)
'End of AdMob

End the Compiler returns this error:

B4X:
c:\android\android-sdk\extras\google\google_play_services\libproject\google-play-services_lib\res\values-v21\appinvite_styles.xml:5: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.Material.Light.DialogWhenLarge.NoActionBar'.
 

gerredtor

Active Member
Licensed User
I have got another question regarding this topic.

My Code:
B4X:
    ad.Initialize("adView", "ca-app-pub-3223271865179256/3923338124")

    Panel1.AddView(ad,0,Height-getAdMobHeight, Width, getAdMobHeight)
      
    ad.LoadAd

And The Error:

B4X:
(Exception) java.lang.Exception:  java.lang.NullPointerException: Attempt to invoke virtual method 'void anywheresoftware.b4a.objects.IbHelper.queryInventoryAsync(anywheresoftware.b4a.objects.IbHelper$QueryInventoryFinishedListener)' on a null object reference
en
** Activity (main) Resume **
** Service (starter) Start **
Service finished downloading
Error occurred on line: 433 (Main)
java.lang.reflect.InvocationTargetException
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at anywheresoftware.b4a.keywords.Common.CallSubDebug(Common.java:852)
    at de.example.app.starter._finish(starter.java:141)
    at de.example.app.starter._response_streamfinish(starter.java:210)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:697)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:339)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:246)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)
    at anywheresoftware.b4a.BA$2.run(BA.java:328)
    at android.os.Handler.handleCallback(Handler.java:739)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:135)
    at android.app.ActivityThread.main(ActivityThread.java:5221)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at anywheresoftware.b4a.debug.Debug.CallSub4(Debug.java:336)
    at anywheresoftware.b4a.debug.Debug.CallSubNew(Debug.java:282)
    ... 22 more
Caused by: java.lang.reflect.InvocationTargetException
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at anywheresoftware.b4a.debug.Debug.CallSub4(Debug.java:318)
    ... 23 more
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/util/SimpleArrayMap;
    at com.google.android.gms.ads.internal.zzs.<init>(Unknown Source)
    at com.google.android.gms.ads.internal.zzs.<init>(Unknown Source)
    at com.google.android.gms.ads.internal.zzb.<init>(Unknown Source)
    at com.google.android.gms.ads.internal.zzc.<init>(Unknown Source)
    at com.google.android.gms.ads.internal.zzf.<init>(Unknown Source)
    at com.google.android.gms.ads.internal.ClientApi.createBannerAdManager(Unknown Source)
    at com.google.android.gms.ads.internal.client.zzl.createBannerAdManager(Unknown Source)
    at com.google.android.gms.ads.internal.client.zze.zza(Unknown Source)
    at com.google.android.gms.ads.internal.client.zzab.zzdh(Unknown Source)
    at com.google.android.gms.ads.internal.client.zzab.zzdg(Unknown Source)
    at com.google.android.gms.ads.internal.client.zzab.zza(Unknown Source)
    at com.google.android.gms.ads.BaseAdView.loadAd(Unknown Source)
    at com.google.android.gms.ads.AdView.loadAd(Unknown Source)
    at anywheresoftware.b4a.admobwrapper.AdViewWrapper.LoadAd(AdViewWrapper.java:118)
    at de.example.app.main._setuppage2(main.java:1441)
    at de.example.app.main._finishdownload(main.java:2431)
    ... 26 more
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.util.SimpleArrayMap" on path: DexPathList[[zip file "/data/app/de.example.app-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
    ... 42 more
    Suppressed: java.lang.ClassNotFoundException: android.support.v4.util.SimpleArrayMap
        at java.lang.Class.classForName(Native Method)
        at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
        at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
        ... 43 more
    Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack avai
Message longer than Log limit (4000). Message was truncated.
 
Upvote 0

gerredtor

Active Member
Licensed User
is the newest version
 

Attachments

  • is it.PNG
    is it.PNG
    29.1 KB · Views: 233
Upvote 0

gerredtor

Active Member
Licensed User
And my admob dont size, he is fixed on the bottom but he dont size
ad.Initialize2("adView", "ca-app-pub-3223271865179256/3923338124", ad.SIZE_SMART_BANNER)
Panel1.AddView(ad,0,adh, Width, adh)
ad.LoadAd
 
Upvote 0
Top