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

🔥When updating 3.4 to 3.5, unable to compile Android #1449

Closed
wmonecke opened this issue May 21, 2020 · 3 comments
Closed

🔥When updating 3.4 to 3.5, unable to compile Android #1449

wmonecke opened this issue May 21, 2020 · 3 comments

Comments

@wmonecke
Copy link

Bug

When upgrading from 3.4 to 3.5 I am unable to compile on Android.

This is what I am getting:

> Task :react-native-push-notification:compileReleaseJavaWithJavac FAILED
/Users/waltermonecke/Documents/Code/React-Native2/moodPixel/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotificationListenerService.java:9: error: package android.support.annotation does not exist
import android.support.annotation.NonNull;
                                 ^
/Users/waltermonecke/Documents/Code/React-Native2/moodPixel/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNReceivedMessageHandler.java:13: error: package android.support.annotation does not exist
import android.support.annotation.NonNull;
                                 ^
/Users/waltermonecke/Documents/Code/React-Native2/moodPixel/node_modules/react-native-push-notification/android/src/main/java/com/dieam/reactnativepushnotification/modules/RNReceivedMessageHandler.java:35: error: cannot find symbol
    public RNReceivedMessageHandler(@NonNull FirebaseMessagingService service) {
                                     ^
  symbol:   class NonNull
  location: class RNReceivedMessageHandler
Note: /Users/waltermonecke/Documents/Code/React-Native2/moodPixel/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.
3 errors

Environment info

"react-native": "0.60.4",
"react-native-push-notification": "^3.5.0",
@wmonecke wmonecke changed the title When updating to 3.5.0 can not compile on Android 🔥When updating to 3.5.0 can not compile on Android May 21, 2020
@wmonecke wmonecke changed the title 🔥When updating to 3.5.0 can not compile on Android 🔥When updating 3.4 to 3.5, unable to compile Android May 21, 2020
@landorid
Copy link

The same situation arises in my application too.

@Dallas62
Copy link
Collaborator

Hi,
Didn't caught this tiny import, I just released 3.5.1 this should be fixed.

@wmonecke
Copy link
Author

@Dallas62 thank you!! :)

vaibhavhrt added a commit to fcbtech/react-native-push-notification that referenced this issue Jun 24, 2020
* Make sure to import PushNotificationIOS from react-native first

* typo

* Delete versions.yml

* Update push-notification-ios to 1.2.0

Version 1.1.0 giving a `No known class method for selector 'didReceiveNotificationResponse'`error

* Add a Log.e() on fail.

* Add option in AndroidManifest to allow/remove notification in foreground (remote-only)

* Change the documentation of onNotification.

* Implement `onNewToken` for Firebase.

* Add an example with sound in project example.

* feat: ✨ Revoke Token method

Added the Revoke Token method to Android only. With this method is possible to generate a new token after a logout case with revoking.

* docs: 📝 Revoke Token method documentation

Added Revoke Token method descprition at Android Only Methods section

* chore: Added Revoke Token button

Updated example with the new Revoke Token method, adding a button, alert feedback and necessary calls

* Allow numbers for `number` and `id` in Android.

* chore: 👌 Revoke Token method renamed to Abandon Permissions

* chore: 👌 Updated to new Abandon Permissions method name

The Revoke Token method has been renamed to Abandon Permissions method

* docs: 📝 Updated with new Abandon Permissions method

Renamed Revoked Method to Abandon Permissions method. The method from iOS only section was removed and added a new general method section with the new method

* Changes in example Application.

* Use directly the callNative for `abandonPermissions`.

* Put deleteInstanceId() in a separate thread.

* Bump to version 3.4.0.

* Prevent crash for NaN.

* Update CHANGELOG.md.

* Prevent sound to be mute in default state.

* Missing change on variable name.

* feat: multiple push providers

fix: fix naming

fix: more fixes

fix: more fixes

fix: add activity service

fix: update naming

* Change from 18 months to 1 year

* feat: explicitly override onNewToken

* zo0r#1431

* Move back onNewToken to Firebase service.

* Bump to 3.5.0.

* Switch from support library to androidx.
zo0r#1449

* Bump to 3.5.1.

* Update README.md

* Fix sounds volume and DND is ignored.
Fix zo0r#1455 `onNotification fires every time when the app goes from background to foreground`

* Remove extra interface.

* Bump to 3.5.2.

* Fix changelog, wrong issue mentioned.

Co-authored-by: Hans Govind <hans@exove.fi>
Co-authored-by: Andrew Tremblay (Pear profile) <43054023+andrewtremblay-pear@users.noreply.github.com>
Co-authored-by: Boris Tacyniak <boris.tacyniak@free.fr>
Co-authored-by: willnaoosmit <55159911+willnaoosmit@users.noreply.github.com>
Co-authored-by: Gabriel Consalter <consaltergabriel@gmail.com>
Co-authored-by: sarah denaci <sarah@gridwise.io>
Co-authored-by: Taymer Ragazzini <tragazzini@gmail.com>
minhnc added a commit to minhnc/react-native-push-notification that referenced this issue Mar 24, 2021
* commit '1d497e60a142b4a846907ec19b80ab72a5ae5c8d': (109 commits)
  Bump to 3.5.2.
  Remove extra interface.
  Fix sounds volume and DND is ignored. Fix zo0r#1455 `onNotification fires every time when the app goes from background to foreground`
  Update README.md
  Bump to 3.5.1.
  Switch from support library to androidx. zo0r#1449
  Bump to 3.5.0.
  Move back onNewToken to Firebase service.
  zo0r#1431
  feat: explicitly override onNewToken
  Change from 18 months to 1 year
  feat: multiple push providers
  Missing change on variable name.
  Prevent sound to be mute in default state.
  Update CHANGELOG.md.
  Prevent crash for NaN.
  Bump to version 3.4.0.
  Put deleteInstanceId() in a separate thread.
  Use directly the callNative for `abandonPermissions`.
  Changes in example Application.
  ...

# Conflicts:
#	android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotificationListenerService.java
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

3 participants