zo0r / react-native-push-notification

React Native Local and Remote Notifications
MIT License
6.77k stars 2.05k forks source link

Task :react-native-push-notification:compileDebugJavaWithJavac FAILED #2293

Closed iamrohitagg closed 1 year ago

iamrohitagg commented 2 years ago

I am trying to run the application but I am gettting error.

Environment info

react-native info output:

 // paste it here
React Native Environment Info:
    System:
      OS: macOS 12.4
      CPU: (4) x64 Intel(R) Core(TM) i5-5350U CPU @ 1.80GHz
      Memory: 51.27 MB / 8.00 GB
      Shell: 5.8.1 - /bin/zsh
    Binaries:
      Node: 16.14.0 - /usr/local/bin/node
      npm: 8.9.0 - /usr/local/bin/npm
      Watchman: 2022.02.28.00 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
    IDEs:
      Android Studio: 2021.2 AI-212.5712.43.2112.8609683
      Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild
    npmPackages:
      react: ^16.8.3 => 16.14.0 
      react-native: 0.59.9 => 0.59.9 

Library version: 3.1.9

/Users/classicinformatics/Desktop/explore-japan/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotification.java:37: error: cannot find symbol
import com.google.firebase.iid.FirebaseInstanceId;
                              ^
  symbol:   class FirebaseInstanceId
  location: package com.google.firebase.iid
/Users/classicinformatics/Desktop/explore-japan/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotification.java:38: error: cannot find symbol
import com.google.firebase.iid.InstanceIdResult;
                              ^
  symbol:   class InstanceIdResult
  location: package com.google.firebase.iid
/Users/classicinformatics/Desktop/explore-japan/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotification.java:131: error: cannot find symbol
              .addOnCompleteListener(new OnCompleteListener<InstanceIdResult>() {
                                                            ^
  symbol:   class InstanceIdResult
  location: class RNPushNotification
/Users/classicinformatics/Desktop/explore-japan/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotification.java:133: error: cannot find symbol
                  public void onComplete(@NonNull Task<InstanceIdResult> task) {
                                                       ^
  symbol: class InstanceIdResult
/Users/classicinformatics/Desktop/explore-japan/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotification.java:130: error: cannot find symbol
      FirebaseInstanceId.getInstance().getInstanceId()
      ^
  symbol:   variable FirebaseInstanceId
  location: class RNPushNotification
/Users/classicinformatics/Desktop/explore-japan/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotification.java:274: error: cannot find symbol
                  FirebaseInstanceId.getInstance().deleteInstanceId();
                  ^
  symbol: variable FirebaseInstanceId
Note: /Users/classicinformatics/Desktop/explore-japan/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotificationHelper.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
6 errors

I have checked the previous issues that suggest to upgrade to a higher version but I cannot do that as that breaks the project for me.

macasfaj commented 2 years ago

Same issue here :(

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 30 days if no further activity occurs. Thank you for your contributions.