Android Question B4A FirebaseAdMob v1.6- problem

kisoft

Well-Known Member
Licensed User
Longtime User
Hi
I try to update the application from the google store, but the application immediately crashes without log errors. My application ID is correct, I also tried on test advertising units but the effect is the same.

firebase-ads 18.2.0
C:\android\tools\bin\sdkmanager.bat
C:\android\platforms\android-28\android.jar
 

kisoft

Well-Known Member
Licensed User
Longtime User
If your app immediately crashes then it is likely that the Admob App Id is incorrect: https://www.b4x.com/android/forum/threads/firebaseadmob-v1-6.108552/

Note that you can see the error if use USB debug mode and check the unfiltered logs.
I checked the application identifier, it's the same in AdMob console and google-services file.
I configured my phone to debug the usb. The application installs itself correctly on the phone but I do not see any errors... I get the message : An error has occurred. Error connecting Rapid Debugger with the process . Try again.

I have never used usb mode, maybe I need to make an additional configuration.
 
Upvote 0

asales

Expert
Licensed User
Longtime User
Did you check the unfiltered logs?

If there is a problem in configuration, you will see this message only in the unfiltered logs:
B4X:
FATAL EXCEPTION: main
Process: com.myapp.profiles, PID: 7527
java.lang.RuntimeException: Unable to get provider com.google.android.gms.ads.MobileAdsInitProvider: java.lang.IllegalStateException:
******************************************************************************
* Invalid application ID. Follow instructions here:                          *
* https://googlemobileadssdk.page.link/admob-android-update-manifest         *
* to find your app ID.                                                       *
******************************************************************************
 
Upvote 0

kisoft

Well-Known Member
Licensed User
Longtime User
I changed my phone and installed the drivers. I managed to get unfiltered logs...
B4X:
topacitivyt exist app = taj.szcz
TOP : taj.szcz / Time : 1568932446 / UserPresent : 958
ClassLoader referenced unknown path: /data/app/taj.szcz-2/lib/arm
topacitivyt update app = taj.szcz time = 2019-09-20 00:34 date = 20190920
Shutting down VM
FATAL EXCEPTION: main
Process: taj.szcz, PID: 14878
java.lang.RuntimeException: Unable to get provider com.google.android.gms.ads.MobileAdsInitProvider: java.lang.IllegalStateException:
******************************************************************************
* Invalid application ID. Follow instructions here:                          *
* https://googlemobileadssdk.page.link/admob-android-update-manifest         *
* to find your app ID.                                                       *
******************************************************************************
    at android.app.ActivityThread.installProvider(ActivityThread.java:5270)
    at android.app.ActivityThread.installContentProviders(ActivityThread.java:4862)
    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4802)
    at android.app.ActivityThread.access$1600(ActivityThread.java:157)
 
Last edited:
Upvote 0

kisoft

Well-Known Member
Licensed User
Longtime User
Maybe my eyes have become uterus and don't see the obvious. I've added a few screenshots.
Or maybe other mistakes made in the code give the same error message in unfiltered logs
 

Attachments

  • errradmob1.png
    errradmob1.png
    128.2 KB · Views: 155
  • errradmob2.png
    errradmob2.png
    53.3 KB · Views: 155
  • errradmob3.png
    errradmob3.png
    67.5 KB · Views: 149
Last edited:
Upvote 0

Pendrush

Well-Known Member
Licensed User
Longtime User
You have SPACE after $ and SPACE before second $ keyword must be $ADMOB_APP_ID$ and NOT $ ADMOB_APP_ID $ as it is in your case.

B4X:
AddReplacement($ADMOB_APP_ID$, ca-app-pub-xxxxxx~xxx)
 
Upvote 0

kisoft

Well-Known Member
Licensed User
Longtime User
You have SPACE after $ and SPACE before second $ keyword must be $ADMOB_APP_ID$ and NOT $ ADMOB_APP_ID $ as it is in your case.

B4X:
AddReplacement($ADMOB_APP_ID$, ca-app-pub-xxxxxx~xxx)

Thanks a lot.... Now it works. Thank you all for your help.

P.S.
I also thank myself, because I made the right diagnosis that my eyes had become a uterus.
I have a few projects to improve and that's why I was under a lot of pressure from the environment. Being on this page:
https://www.b4x.com/android/forum/threads/firebaseadmob-v1-6.108552/
I used a google translator and copied the translated text to the project (unfortunately, the text was formatted in this way, with spaces).
 
Last edited:
Upvote 0
Top