-
Notifications
You must be signed in to change notification settings - Fork 678
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error: cannot find symbol import com.google.firebase.iid.FirebaseInstanceIdService; #1111
Comments
log..
FAILURE: Build failed with an exception.
BUILD FAILED in 1m 8s |
add public void onNewToken(String s) in MessagingService can fixed the issues |
But error is located in this file:- |
Suddenly, I face the same error too, running on android device. |
I made some changes in code in below file, and its working now, also receiving notifications successfully:
Edit: i don't know if it is right thing to do or not, can anyone confirm ? |
don't use InstanceIdService.java, see https://firebase.google.com/docs/reference/android/com/google/firebase/iid/FirebaseInstanceIdService |
maybe use
and add public void onNewToken(String s) in MessagingService |
hide InstanceIdService.java don't used the class :) |
It working again after I follow @ravishankar3961 , thanks. It is because depreciated method |
but my push notifications not working |
@thisisbalaG |
@haripermadi were you able to generate token ? |
yes, I can generate the token. I used this for a chatting feature using qiscus sdk. When I test sending push notif from firebase console, it is working properly, but when I test using my chat it doesn't work. |
@ravishankar3961 so can We Help me |
i build successfully. but this app crash when run. someone help me :| |
@ravishankar3961 It working again with notification push tested. |
Thanks @ravishankar3961 It's working now! |
I have same problem. It worked before. But now, It shown the error. |
Thanks for the help @ravishankar3961. Your solution resolved the error but my app is crashing on launch without any error. |
Solution resolved the error for me also but app crashes on start |
Thanks @ravishankar3961 .Your solution works but application started crashing on launch. |
ah, I confirm that @ravishankar3961 's solution is worked for me. Many thanks |
Thanks @ravishankar3961 . The Solution did worked, you saved the day..!! 👍 |
@ravishankar3961 After doing the changes, I am getting this Error and Build fails.
|
Hello everyone ,
How to solve the above issue? |
@ravishankar3961 @haripermadi just facing this error around 3 hours ago, previously was running just fine. I tried @ravishankar3961's solution and the build succeed. Notification received on background, but not on the foreground. For background notification, click_action is also not working. Probably the best time to switch to react-native-firebase? |
The @ravishankar3961 's solution worked but it not the right way as a build server will not get the fix. It needs to be added upstream to react-native-fcm. |
change firebase version in below files:
and
|
@Sharcoux I had the same thought. Simply put, the module is not locked to a Firebase SDK version. It's implementation broke as it is compiled against a newer Firebase SDK version. It's a not like this moment. |
@testshallpasswork Thank you for your answer. I'm not sure about what you mean though. Don't I have everything I need inside my node_modules? If not what is it exactly that is being taken from away? Does it mean that I could not build the app without an internet connection? |
@Sharcoux generaly when your android project build, it fetches its natives dependencies on maven, in this case the latest version of firebase sdk, which has deprecated somethings. That's why the fixed version works. |
@iamcxa did you face any problem or error building signed apk after following this solution? |
I confirm the solution from suresh-borad works!!! |
How do you guys find out what version of I looked at https://firebase.google.com/support/release-notes/android#latest_sdk_versions but only see the latest verison. I would expect the release notes page would have all available versions in it... pretty bad actually |
@TomYan2255 this answer has saved my life. Can I buy you a beer? |
@ptgamr see the full list here - https://developers.google.com/android/guides/releases |
see *react-native-fcm* repo bug issue. basically a change to their source may be needed. [evollu#1111](evollu#1111)
For those of you who still use this library. Here is
|
@ravishankar3961 trying to apply your fix but doesn't seem to work for me. I have react-native-fcm version 11.3.1 |
@Base29 What is your project's RN version? This looks like AndroidX support error. Try adding support for AndroidX. |
@ravishankar3961 RN version is 0.59.10. What is the best way of adding androidx support? |
@Base29 some news? |
@gustavogialimvizir same thing here, started happening about hour ago Do anyone have an idea what to do in such cases? |
@gustavogialimvizir @nikolaywithpara same here, but got this issue in |
@gustavogialimvizir Same here... both our projects uses |
@gustavogialimvizir @isnifer @Helen2hang Try to add |
@nikolaywithpara you rock. It worked for me. |
@nikolaywithpara it worked |
Thank you so much @nikolaywithpara. It has worked successfully. |
Previously running application has failed com.google.firebase.iid.FirebaseInstanceIdService.This worked for me. I hope I can help you |
Adding the firebaseMessagingVersion line worked for me, no need to specify the react-native-push-notification version (although it's still probably a good idea to do so...) |
didnt work for me :( |
Fantastic! It worked. Thanks a lot |
"react-native": "0.55.3"
"react-native-fcm": "^16.2.4",
Running on android emulator : android version : 7.0
My project is not running suddenly with the following error. Please help.
<===="ProjectDirectory"====> \node_modules\react-native-fcm\android\src\main\java\com\evollu\react\fcm\InstanceIdService.java:14: error: cannot find symbol
import com.google.firebase.iid.FirebaseInstanceIdService;
^
symbol: class FirebaseInstanceIdService
location: package com.google.firebase.iid
The text was updated successfully, but these errors were encountered: