ionic-team / capacitor-plugins

Official plugins for Capacitor ⚡️

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@capacitor/push-notifications error on Android - fireNotification

JackLazenbyZigzag opened this issue · comments

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

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.