question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed resolution of: Lcom/google/firebase/iid/FirebaseInstanceId

See original GitHub issue
    implementation 'com.mixpanel.android:mixpanel-android:5.9.1'

    // Firebase
    implementation platform('com.google.firebase:firebase-bom:28.0.1')

    implementation 'com.google.firebase:firebase-messaging'
    implementation "com.google.firebase:firebase-config"
    implementation 'com.google.firebase:firebase-core'
    implementation 'com.google.firebase:firebase-dynamic-links'
    implementation 'com.google.firebase:firebase-auth-ktx'
    implementation 'com.google.firebase:firebase-analytics'
    implementation 'com.google.firebase:firebase-database-ktx'
    implementation 'com.google.firebase:firebase-firestore-ktx'
    implementation 'com.google.firebase:firebase-crashlytics'

Crash on startapp

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/iid/FirebaseInstanceId;
        at com.mixpanel.android.mpmetrics.MixpanelFCMMessagingService.init(MixpanelFCMMessagingService.java:84)
        at com.mixpanel.android.mpmetrics.MixpanelAPI.getInstance(MixpanelAPI.java:655)
        at com.mixpanel.android.mpmetrics.MixpanelAPI.getInstance(MixpanelAPI.java:536)
        at myapp.App.onCreate(App.kt:52)

myapp.App.onCreate(App.kt:52):

MixpanelAPI.getInstance(this, BuildConfig.MIXPANEL_TOKEN)

Firebase: 28.0.1 don’t contain FirebaseInstanceId at all. It was deprecated a few versions ago. You should use: FirebaseMessaging.getToken() for messaging or FirebaseInstallations for app instance identifiers. More info: https://firebase.google.com/docs/reference/android/com/google/firebase/iid/FirebaseInstanceId

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:23
  • Comments:21

github_iconTop GitHub Comments

161reactions
MDXDavecommented, Jun 1, 2021

You can fix this issue by adding the firebase-iid dependency:

implementation("com.google.firebase:firebase-iid")
33reactions
omarreesscommented, Jul 26, 2021
Added these in App's Build gradl dependencies 

implementation platform('com.google.firebase:firebase-bom:28.0.1')
implementation("com.google.firebase:firebase-iid")
Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed resolution of: Lcom/google/firebase/FirebaseApp ...
Generate google-services.json and put it to your android/app/ directory. ... implementation("com.google.firebase:firebase-iid").
Read more >
Failed resolution of FirebaseInstanceId at com.Backendless ...
Messaging.registerDevice() is called, the app crashes with failed resolution of “FirebaseInstanceId” in com.Backendless.push.FCMRegistration ( ...
Read more >
Flutter: java.lang.NoClassDefFoundError: Failed resolution of ...
Coding example for the question Flutter: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/iid/FirebaseInstanceId-Flutter.
Read more >
java.lang.NoClassDefFoundError: Failed resolution of: Lcom ...
java.lang.noclassdeffounderror : failed resolution of: lcom/google/firebase/iid/firebaseinstanceid. Add Answer | View In TPC Matrix.
Read more >
FirebaseInstanceId - Google
public class FirebaseInstanceId extends Object. This class is deprecated. Firebase Instance ID has been replaced with FirebaseInstallations for app instance ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found