Android Question java.lang.NoClassDefFoundError: com.google.firebase.database.FirebaseDatabase

jkhazraji

Active Member
Licensed User
Longtime User
Hi everybody,
I am trying to test @DonManfred library FirebaseRealtimeDatabase
[ https://www.b4x.com/android/forum/threads/firebaserealtimedatabase4j.72162/ ]
As I initialize a DatabaseReference as shown below I get the error:
java.lang.NoClassDefFoundError: com.google.firebase.database.FirebaseDatabase
B4X:
Sub Globals
    'These global variables will be redeclared each time the activity is created.
    Private fb As FirebaseDatabase
   
End Sub

Sub Activity_Create(FirstTime As Boolean)
    Activity.LoadLayout("Layout")
    fb.Initialize("fb")
   'xxxxxxxxx =project-id
    Dim dbr As DatabaseReference= fb.getReferencefromUrl("https://xxxxxxxxxxxx.firebaseio.com/")
    dbr.goOnline
End Sub
Although I downloaded com.google.firebase:firebase.database mavens (ktx, collection, connection, collection-license, connection-license) from SDK , the error keeps showing
Any help will be appreciated
 
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…