I am trying to follow this
www.b4x.com
but without success.
"If the app immediately crashes then it is likely that the app id is wrong. Start with the sample app id and then change it to your app id."
Yes, my apps crash immediately.
I tried both sample app id and my app id.
B4A Sdk Manager: updated all recommended items
B4A: v8.50
Android.jar: android-28
firebase-ads: v18.3.0
FirebaseAdMob Library: v1.6
Added:
When I add this to manifest and compile app, I can't find this string ca-app-pub-3940256099942544~3347511713 in AndroidManifest.xml.
Is that because I do not have newest B4A 9.5?
How can I add missing lines manually?
FirebaseAdMob v1.6
Google has added a few new requirements to AdMob implementation. You must make these changes if you are using the latest versions of Android SDK libraries (firebase-ads 18.1.1+). Instructions: 2. Find your AdMob app id and add it to the manifest editor: 'This is a sample AdMob app id. You need...
"If the app immediately crashes then it is likely that the app id is wrong. Start with the sample app id and then change it to your app id."
Yes, my apps crash immediately.
I tried both sample app id and my app id.
B4X:
*** Service (httputils2service) Create ***
** Service (httputils2service) Start **
*** Service (starter) Create ***
starter_service_create (java line: 149)
java.lang.IllegalStateException: A required meta-data tag in your app's AndroidManifest.xml does not exist. You must have the following declaration within the <application> element: <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
at com.google.android.gms.common.GooglePlayServicesUtilLight.isGooglePlayServicesAvailable(Unknown Source:39)
at com.google.android.gms.common.GoogleApiAvailabilityLight.isGooglePlayServicesAvailable(Unknown Source:0)
at com.google.android.gms.internal.ads.zzamu.zzbe(Unknown Source:7)
at com.google.android.gms.internal.ads.zzjr.zza(Unknown Source:10)
at com.google.android.gms.internal.ads.zzmb.zza(Unknown Source:32)
at com.google.android.gms.ads.MobileAds.initialize(Unknown Source:7)
at com.google.android.gms.ads.MobileAds.initialize(Unknown Source:1)
at anywheresoftware.b4a.admobwrapper.AdViewWrapper$MobileAdsWrapper.Initialize(AdViewWrapper.java:347)
at com.ddrmic.footballprediction.starter._service_create(starter.java:149)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:191)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:171)
at com.ddrmic.footballprediction.starter.onCreate(starter.java:56)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:3544)
at android.app.ActivityThread.-wrap4(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1786)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6944)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
B4A Sdk Manager: updated all recommended items
B4A: v8.50
Android.jar: android-28
firebase-ads: v18.3.0
FirebaseAdMob Library: v1.6
Added:
Service_Create:
Dim MobileAds As MobileAds
MobileAds.Initialize
Manifest:
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
CreateResourceFromFile(Macro, FirebaseAdMob.FirebaseAds)
AddReplacement($ADMOB_APP_ID$, ca-app-pub-3940256099942544~3347511713)
When I add this to manifest and compile app, I can't find this string ca-app-pub-3940256099942544~3347511713 in AndroidManifest.xml.
Is that because I do not have newest B4A 9.5?
How can I add missing lines manually?