Android Question Official Firebase Push example crashes on startup - NoClassDefFoundError com.google.firebase.components.Qualified

javierfs

Member
Licensed User
Longtime User
Message:


Hello,


I'm testing the official B4A Firebase Push example without any code changes.


Environment:


  • B4A 13.50
  • Java 11
  • Android SDK 35
  • Samsung S20
  • Android 13

The project compiles successfully, installs successfully, but crashes immediately on startup before any B4A code is executed (Activity_Create / Service_Create are never reached).


Logcat:



FATAL EXCEPTION: main
java.lang.NoClassDefFoundError: Failed resolution of:
Lcom/google/firebase/components/Qualified;

at com.google.firebase.datatransport.TransportRegistrar.getComponents(...)
at com.google.firebase.components.ComponentRuntime...
at com.google.firebase.FirebaseApp.initializeApp(...)
at com.google.firebase.provider.FirebaseInitProvider.onCreate(...)

Caused by:
java.lang.ClassNotFoundException:
Didn't find class
"com.google.firebase.components.Qualified"



The google-services.json package name matches the application package.


I also tried:


  • Fresh B4A installation.
  • Downloaded all libraries again with B4X SDK Manager.
  • Java 11.
  • Android SDK 35.
  • Official example without modifications.

The result is always the same.


Any idea why com.google.firebase.components.Qualified is missing?


Thank you.
 

Attachments

  • Pushlast.zip
    12.4 KB · Views: 1

DonManfred

Expert
Licensed User
Longtime User
I also tried:


  • Fresh B4A installation.
  • Downloaded all libraries again with B4X SDK Manager.
  • Java 11.
  • Android SDK 35.
  • Official example without modifications.
with the most up to date installation and ressources there is NO NEED to download anything with the sdk manager.


Download Android SDK Command line tools (13114758).
Download the required resources (7_25), (alternative link)
 
Upvote 0

javierfs

Member
Licensed User
Longtime User
Thank you.


I installed B4A 13.50 and then downloaded the libraries with the SDK Manager because I thought it was the correct procedure.


Are you suggesting I should delete my current SDK/resources and install the official Resources 7_25 package instead?


Will that solve the NoClassDefFoundError: com.google.firebase.components.Qualified issue?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
What i am saying that that you are the first who have this problem. At least i can´t remember a similar thread in the last time.

We all are using the newwest commandline tools and resources.

And if you are talking about a fresh instand then this should contain the sdk too.
Are you suggesting I should delete my current SDK/resources and install the official Resources 7_25 package instead?
If you are not using this version of the resources then yes.

I can´t tell if it will solve but should try a real fresh install for b4a commandtools, resources and b4a.
 
Upvote 0

javierfs

Member
Licensed User
Longtime User
Thank you very much, DonManfred.


You were right. I created a completely new installation with the official Resources 7_25, Command-line Tools, Java 11 and B4A 13.50.


The official Firebase Push example now works correctly and I can obtain the FCM token, so the environment is OK.


Thank you for pointing me in the right direction.
 
Upvote 0
Top