Android Question FirebaseAdMob 1.60 - MobileAds

LucaMs

Expert
Licensed User
My test app (just ads "stuff") crashes always.
AdMob app ID is correct.

I'm using B4A V. 8.80; is FirebaseAdMob 1.60 compatible with this version?

(tried with android 28 & 29)


FATAL EXCEPTION: main
Process: com.test.rewardedvideotest, PID: 11677
java.lang.RuntimeException: Unable to get provider com.google.android.gms.ads.MobileAdsInitProvider: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.ads.MobileAdsInitProvider" on path: DexPathList[[zip file "/data/app/com.test.rewardedvideotest-B2CwMYjYXa1wmCN8pwJpEA==/base.apk"],nativeLibraryDirectories=[/data/app/com.test.rewardedvideotest-B2CwMYjYXa1wmCN8pwJpEA==/lib/arm64, /system/lib64, /vendor/lib64, /product/lib64]]
at android.app.ActivityThread.installProvider(ActivityThread.java:7209)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:6693)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6594)
at android.app.ActivityThread.-wrap2(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
at android.os.Handler.dispatchMessage(Handler.java:108)
at android.os.Looper.loop(Looper.java:166)
at android.app.ActivityThread.main(ActivityThread.java:7523)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.ads.MobileAdsInitProvider" on path: DexPathList[[zip file "/data/app/com.test.rewardedvideotest-B2CwMYjYXa1wmCN8pwJpEA==/base.apk"],nativeLibraryDirectories=[/data/app/com.test.rewardedvideotest-B2CwMYjYXa1wmCN8pwJpEA==/lib/arm64, /system/lib64, /vendor/lib64, /product/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
 

asales

Well-Known Member
Licensed User
Did you initialized the MobileAds in the Starter service?
I'm using B4A 9.50 and works fine.
 

LucaMs

Expert
Licensed User
Are you using the latest versions of all recommended items in B4A Sdk Manager?
I still use the "old" google sdk manager (I don't remember or maybe I just don't know why you added this to b4a), as it groups the items based on the Android versions.

Now I'm looking at those recommended by b4a.

I'll try (excluding the emulator, for example) and I'll let you know, Erel.

Thank you
 

LucaMs

Expert
Licensed User
The simplest solution is to upgrade to B4A v9+
Installed "all" recommended files (excluding those related to emulators)... crash again.

The same "project" works with b4a 9+ (my-our friend's b4a).

Upgrading to B4A 9+ is simpler, you're right, but also not as cheap :D (I prefer always the Enterprise version, of course).
 
Last edited:

LucaMs

Expert
Licensed User
Do you get the same error message? Are you using B4A Sdk Manager?
No unfiltered message.

Yes, updatete/added all the recommended file, after updating to b4a 9.50.

I will try again to take the unfiltered log :( (4 days!)
 

LucaMs

Expert
Licensed User
Ummm... watching my post above... I see now:
"Usually found under c:\android-sdk\platforms\android-x"
 

LucaMs

Expert
Licensed User
Noticed that:
upload_2019-11-5_12-31-42.png


I have also an android-28 (no 29) in C:\Android\platforms\android-28!

A little confused :D:(
 

LucaMs

Expert
Licensed User
you should NOT use targetsdk 29 for now.
Use the android.jar from platform 28. Use targetsdk 28 in manifest.
Setting to 28 (but the one I have in c:\... not in appdata\local...)

No more crashes!

although I receive error 3 instead of advertising.
it's already a big step forward.
But I have to do a bit of order, instead of having various java in two places.
I installed sdk 29 in "local" because, strangely, it did not allow me to do it in c: as if my user was not an administrator (but it is the only one on the PC!)
 

DonManfred

Expert
Licensed User
Use the android.jar from platform 28. Use targetsdk 28 in manifest.
addition

If you want to use targetsdk 29 then you need to add SDK29 with the b4asdkmanager first.

Scroll down to Android-29->"Android SDK Platform 29 (Android 29)" <-- Install it
 
Top