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

Error for Android Task :react-native-push-notification:compileDebugJavaWithJavac FAILED #1578

Closed
jtstodola opened this issue Aug 3, 2020 · 7 comments
Assignees

Comments

@jtstodola
Copy link

jtstodola commented Aug 3, 2020

Getting a build error with android only with version 5.0.0. This works fine on version 4.0.0.
Task :react-native-push-notification:compileDebugJavaWithJavac FAILED

react-native info output:

System:
    OS: macOS 10.15.5
    CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 2.16 GB / 32.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 14.4.0 - /usr/local/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.4 - /usr/local/bin/npm
    Watchman: Not Found
  Managers:
    CocoaPods: 1.9.3 - .../.rvm/gems/ruby-2.7.1/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 13.5, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
    Android SDK: Not Found
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.6010548
    Xcode: 11.5/11E608c - /usr/bin/xcodebuild
  Languages:
    Java: javac 13 - /usr/bin/javac
    Python: 2.7.17 - /usr/local/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.11.0 => 16.11.0
    react-native: 0.62.2 => 0.62.2
  npmGlobalPackages:
    *react-native*: Not Found

Library version: 5.0.0

Steps To Reproduce

  1. run react-native run-android

Describe what you expected to happen:

  1. Error: Task :react-native-push-notification:compileDebugJavaWithJavac FAILED
@OzzieOrca
Copy link

This report doesn't appear to have the actual error message that made the task fail. With 5.0.0, I'm getting the following error which might be related to or what the original reporter saw:
error: variable userInteraction might not have been initialized at https://github.com/zo0r/react-native-push-notification/blob/5.0.0/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotificationAttributes.java#L125

@jtstodola
Copy link
Author

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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.0.1/userguide/command_line_interface.html#sec:command_line_warnings
82 actionable tasks: 2 executed, 80 up-to-date
warning: [options] source value 7 is obsolete and will be removed in a future release
warning: [options] target value 7 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
.../node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotificationAttributes.java:125: error: variable userInteraction might not have been initialized
}
^
.../node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotificationAttributes.java:167: error: variable userInteraction might not have been initialized
}
^
.../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.

@OzzieOrca
Copy link

Seems like a lot of these were removed in 1f97855#diff-8ac7b931eb24f7299a39ace1d825572cL39. Not sure if that was a merge commit or what.

@amanu-nur
Copy link

Got an error when building with Android using version 5.0.0

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

react-native info

System:
OS: Windows 10 10.0.18363
CPU: (4) x64 Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz
Memory: 2.17 GB / 5.95 GB
Binaries:
Node: 14.1.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.4 - E:\Yarn\bin\yarn.CMD
npm: 6.14.4 - C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK:
API Levels: 23, 28, 29
Build Tools: 23.0.1, 28.0.3, 29.0.2, 29.0.3
System Images: a...ult | ARM EABI v7a, a...-23 | Intel x86 Atom, a... | Intel x86 Atom_64, a...pis | Google APIs ARM EABI v7a Syste..., a...google_apis | Google APIs Intel x86 Atom Sys..., a...gle_apis | Google APIs Intel x86 Atom_64 ..., a...s_playstore | Google Play Intel x86 Atom Sys..., a...-28 | Intel x86 Atom, a... | Intel x86 Atom_64, a...gle_apis | Google APIs Intel x86 Atom_64 ..., a...s_playstore | Google Play Intel x86 Atom Sys..., a...laystore | Google Play Intel x86 Atom_64 ...
Android NDK: Not Found
IDEs:
Android Studio: Version 4.0.0.0 AI-193.6911.18.40.6514223
Languages:
Java: 1.8.0_211
Python: 2.7.18
npmPackages:
@react-native-community/cli: Not Found
react: 16.13.1 => 16.13.1
react-native: 0.63.2 => 0.63.2
npmGlobalPackages:
react-native: Not Found

@OmarBasem
Copy link

Getting same error!

@Dallas62 Dallas62 self-assigned this Aug 4, 2020
@Dallas62
Copy link
Collaborator

Dallas62 commented Aug 4, 2020

Seems like a lot of these were removed in 1f97855#diff-8ac7b931eb24f7299a39ace1d825572cL39. Not sure if that was a merge commit or what.

No, just a fail 😅

The NPM package is released in 5.0.1.

Sorry for this mistake

@jtstodola
Copy link
Author

Thanks for the quick fix!

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