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/android/gms/iid/InstanceID

See original GitHub issue

Build is failing with this library. Error is thrown in RNDeviceModule.java on line 12 at import com.google.android.gms.iid.InstanceID;

If I remove this line and line 112 constants.put("instanceId", InstanceID.getInstance(this.reactContext).getId());, my app builds successfully. Anybody have a permanent or better fix?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

15reactions
redbluenatcommented, Oct 13, 2017

it helps me

  compile ("com.google.android.gms:play-services-gcm:10.0.1") {
        force = true;
    }

my gardle file:

  compile(project(':react-native-device-info')) {
        exclude group: 'com.google.android.gms'
    }
    compile(project(':react-native-maps')) {
        exclude group: 'com.google.android.gms'
    }
    compile fileTree(dir: "libs", include: ["*.jar"])
    compile "com.android.support:appcompat-v7:26.0.0"
    compile "com.facebook.react:react-native:+"  // From node_modules
    compile("com.google.android.gms:play-services-base:10.2.4") {
        force = true
    }
    compile("com.google.android.gms:play-services-maps:10.2.4") {
        force = true;
    }
    compile ("com.google.android.gms:play-services-gcm:10.2.4") {
        force = true;
    }
1reaction
redbluenatcommented, Jan 24, 2018

I am glad that it works for you guys 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed resolution of: Lcom/google/firebase/iid ...
I'm still getting this issue on 5.9.4 and 5.9.5: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/iid/ ...
Read more >
Failed resolution of: Lcom/google/firebase/FirebaseApp - ...
Generate google-services.json and put it to your android/app/ directory. Add classpath 'com.google.gms:google-services:4.1.0' to buildscript ...
Read more >
Crash: Failed resolution of FirebaseInstanceId at com. ...
Hi Backendless, We are experiencing crashes in our Android app, which has been running for quite a while (over 4 years) without problems, ......
Read more >
Didn't find class "com.google.android.gms.common.R$string ...
after update android studio to 3.6.0 and update Gradle version to `3.6.0` I got error ... Failed resolution of: Lcom/google/android/gms/common/R$string;
Read more >
Failed resolution of: Lcom/google/firebase/FirebaseApp-React ...
Coding example for the question Java.lang. ... implementation("com.google.firebase:firebase-iid") ... apply plugin: 'com.google.gms.google-services'.
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