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

@capacitor/push-notifications error on Android - fireNotification #2043

Closed
JackLazenbyZigzag opened this issue Feb 28, 2024 · 1 comment
Closed

Comments

@JackLazenbyZigzag
Copy link

JackLazenbyZigzag commented Feb 28, 2024

Bug Report

Plugin(s)

@capacitor/push-notifications

Capacitor Version

Latest Dependencies:

  @capacitor/cli: 5.7.0
  @capacitor/core: 5.7.0
  @capacitor/android: 5.7.0
  @capacitor/ios: 5.7.0

Installed Dependencies:

  @capacitor/cli: 5.6.0
  @capacitor/core: 5.6.0
  @capacitor/android: 5.6.0
  @capacitor/ios: 5.6.0

Platform(s)

Android

Current Behavior

When building the app on Android, even if I'm not actually calling the plugin (only have it installed in the package.json) it throws the below error in the PushNotificationPlugin.java:

error: no suitable method found for createNotificationInfo(Context,Context,NotificationParams,String,Bundle) CommonNotificationBuilder.DisplayNotificationInfo notificationInfo = CommonNotificationBuilder.createNotificationInfo( ^ method CommonNotificationBuilder.createNotificationInfo(Context,NotificationParams) is not applicable (actual and formal argument lists differ in length) method CommonNotificationBuilder.createNotificationInfo(Context,String,NotificationParams,String,Resources,PackageManager,Bundle) is not applicable (actual and formal argument lists differ in length)

Expected Behavior

The library should not throw an error and the Android platform should compile correctly.

Code Reproduction

Created a project using Angular Ionic, installed the latest version of the plugin, synced it and ran it on Android.

Other Technical Details

This is whilst using the latest version of Android Studio, using Ionic Angular as the platform to build the project on and simply installing the plugin.

Additional Context

Copy link

ionitron-bot bot commented Mar 14, 2024

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of the plugin, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Mar 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants