Skip to content
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

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

Open
yusuf987 opened this issue May 8, 2019 · 5 comments
Open

Comments

@yusuf987
Copy link

yusuf987 commented May 8, 2019

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

@Bob-JZhao
Copy link

@yusuf987 you could find a solution at here #1111

@yusuf987
Copy link
Author

yusuf987 commented May 8, 2019

thanks, @yourbob , I found the solution here #1111

@Fcasasherrera
Copy link

This worked for me

change firebase version in below files:
${project}\node_modules\react-native-fcm\android\build.gradle,

...
//def DEFAULT_FIREBASE_CORE_VERSION = "+"
//def DEFAULT_FIREBASE_MESSAGING_VERSION = "+"
def DEFAULT_FIREBASE_CORE_VERSION = "16.0.3"
def DEFAULT_FIREBASE_MESSAGING_VERSION = "17.6.0"
...

@hidayatridwan
Copy link

Thanks @yourbob i resolve with this link

@berksafran
Copy link

Solution is here: #1111 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants