Execution failed for task ':react-native-fcm:compileDebugJavaWithJavac'.
See original GitHub issueproject info “react-native”: “0.49.3”, “react-native-fcm”: “16.2.0”,
till yesterday there was no issue with my project, but today I am not able to build the project even I did not change a single line I am getting below error
> Task :react-native-fcm:compileDebugJavaWithJavac
D:\K_E\KE_7_may\koenig-employee\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
D:\K_E\KE_7_may\koenig-employee\node_modules\react-native-fcm\android\src\main\java\com\evollu\react\fcm\InstanceIdService.java:16: error: cannot find symbol
public class InstanceIdService extends FirebaseInstanceIdService {
^
symbol: class FirebaseInstanceIdService
D:\K_E\KE_7_may\koenig-employee\node_modules\react-native-fcm\android\src\main\java\com\evollu\react\fcm\InstanceIdService.java:26: error: method does not override or implement a method from a supertype
@Override
^
D:\K_E\KE_7_may\koenig-employee\node_modules\react-native-fcm\android\src\main\java\com\evollu\react\fcm\InstanceIdService.java:44: error: cannot find symbol
ReactInstanceManager mReactInstanceManager = ((ReactApplication) getApplication()).getReactNativeHost().getReactInstanceManager();
^
symbol: method getApplication()
D:\K_E\KE_7_may\koenig-employee\node_modules\react-native-fcm\android\src\main\java\com\evollu\react\fcm\InstanceIdService.java:48: error: cannot find symbol
LocalBroadcastManager.getInstance(getApplicationContext()).sendBroadcast(message);
^
symbol: method getApplicationContext()
D:\K_E\KE_7_may\koenig-employee\node_modules\react-native-fcm\android\src\main\java\com\evollu\react\fcm\InstanceIdService.java:53: error: cannot find symbol
LocalBroadcastManager.getInstance(getApplicationContext()).sendBroadcast(message);
^
symbol: method getApplicationContext()
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
6 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-fcm:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
can somebody please help me to solve and understand why this happens
Thanks
Issue Analytics
- State:
- Created 4 years ago
- Comments:5
Top Results From Across the Web
Build failing for android with error "Execution failed for task ...
I experienced similar error today, it is due to deprecation of certain firebase classes used by react-native-fcm. You can either rewrite the ...
Read more >Execution failed for task ':react-native-fcm ... - Sok Sopha Blog
This worked for me change firebase version in below files: ${project}\node_modules\react-native-fcm\android\build.gradle, ...
Read more >@react-native-firebase/messaging - npm
React Native Firebase provides native integration of Firebase Cloud Messaging (FCM) for both Android & iOS. FCM is a cost free service, ...
Read more >task :notifee_react-native:compiledebugjavawithjavac failed
I'm trying to run 'npx expo run:android' command to build my expo react native app after installing @notifee/react-native package which uses native code....
Read more >Task - coding heesong - 티스토리
Task :react-native-firebase_messaging:compileDebugJavaWithJavac FAILED ... 4.99.99]' // Required for OneSignal, even if you have added FCM.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Solution is here: https://github.com/evollu/react-native-fcm/issues/1111#issuecomment-839223648
Thanks @YourBoB i resolve with this link