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.

Firebase Cloud Messaging Cannot invoke method get() on null object

See original GitHub issue

When i want to react-native run-android i get this error

* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApk'.
   > A problem occurred configuring project ':react-native-push-notification'.
      > Cannot invoke method get() on null object

I am using firebase cloud messaging… Or is that not a good idea? I just want to send Push Notifications from my backend to the app.

When i did these steps descriped in firebase. I get the errror

(<project>/build.gradle):
buildscript {
  dependencies {
    // Add this line
    classpath 'com.google.gms:google-services:4.0.0'
  }
}
(<project>/<app-module>/build.gradle):
dependencies {
  // Add this line
  compile 'com.google.firebase:firebase-core:16.0.0'
}
...
// Add to the bottom of the file
apply plugin: 'com.google.gms.google-services'

I tried to open it with android studio but there i get the same error message

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
baselbjcommented, Aug 11, 2018

try updating android/build.gradle from: classpath ‘com.google.gms:google-services:4.0.0’ to: classpath ‘com.google.gms:google-services:4.0.1’

stackoverflow: https://stackoverflow.com/questions/50844361/failed-to-notify-dependency-resolution-listener

2reactions
Ashutosh8127commented, Jul 24, 2018

heyyy (<project>/build.gradle): buildscript { dependencies { // Add this line classpath ‘com.google.gms:google-services:+’ } } (<project>/<app-module>/build.gradle): dependencies { // Add this line compile ‘com.google.firebase:firebase-core:+’ } … // Add to the bottom of the file apply plugin: ‘com.google.gms.google-services’

it’s use like this it’s work fine

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot invoke method get() on null object - Stack Overflow
I'm experiencing a build issue when adding a firebase dependency to a android library. My setup is as ...
Read more >
Cannot invoke method get() on null object-React Native
Coding example for the question react native Push Notification error: Cannot invoke method get() on null object-React Native.
Read more >
Receive messages in an Android app - Firebase - Google
By overriding the method FirebaseMessagingService.onMessageReceived , you can perform actions based on the received RemoteMessage object and get the message ...
Read more >
Caused by java.lang.NullPointerException Attempt to invoke ...
Attempt to invoke virtual method 'void com.newrelic.agent.android.tracing.TraceMachine.completeActivityTrace()' on a null object ...
Read more >
Null Reference Exceptions - Unity - Manual
NullReferenceException: Object reference not set to an instance of an object at ... is no game object with that name, so the Find()...
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