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.

Execution failed for task ':react-native-fcm:compileDebugJavaWithJavac'.

See original GitHub issue

project 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:open
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

0reactions
hidayatridwancommented, May 18, 2019

Thanks @YourBoB i resolve with this link

Read more comments on GitHub >

github_iconTop 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 >

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