NullPointerException on FirebaseInstallations.registerFidWithServer

Viewed 20

I am experiencing the following crash on an Android app using Firebase analytics:

Exception java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference
  at com.google.firebase.installations.FirebaseInstallations.registerFidWithServer (FirebaseInstallations.java:452)
  at com.google.firebase.installations.FirebaseInstallations.doNetworkCallIfNecessary (FirebaseInstallations.java:331)
  at com.google.firebase.installations.FirebaseInstallations.lambda$doGetId$1 (FirebaseInstallations.java:296)
  at com.google.firebase.installations.FirebaseInstallations$$Lambda$3.run
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
  at java.lang.Thread.run (Thread.java:919)

According to this old thread, the issue should be resolved in firebase-installations:16.3.3

But I do not even have that dependencies:

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation 'androidx.core:core-ktx:1.3.0'
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'com.google.android.gms:play-services-ads:19.3.0'
    implementation 'com.google.firebase:firebase-analytics-ktx:17.5.0'
    implementation 'com.alexvasilkov:gesture-views:2.6.0'
    implementation 'com.amitshekhar.android:android-networking:1.0.2'

    implementation project(':nativetemplates')
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'androidx.recyclerview:recyclerview:1.1.0'
    implementation 'com.google.firebase:firebase-analytics:17.4.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
    implementation 'com.parse.bolts:bolts-tasks:1.4.0'
    implementation "com.parse:parse-android:1.17.3"
}

Can someone guide me how to make sure I am using 16.3.3 in this legacy app? I m new to Android and I can't break this legacy app.

0 Answers
Related