Questions
Q:

you’ve attempted to use a Firebase service before calling ‘Firebase.initializeApp’

I got this error when I try to signup my application,

Usually this means you've attempted to use a Firebase service before calling Firebase.initializeApp.

I cannot find any error in my code, I add these in gradle file,

apply plugin: 'com.google.gms.google-services'

dependencies {
    implementation platform('com.google.firebase:firebase-bom:29.1.0')
    implementation 'com.google.firebase:firebase-analytics'
}

why I get this error?