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

Method startServiceConnection in class PurchasePlugin cannot be applied to given types #1564

Closed
marioshtika opened this issue May 15, 2024 · 3 comments

Comments

@marioshtika
Copy link

Observed behavior

When I run the below command

ionic cordova platform add android

The build is failing with the below message

> Task :app:compileDebugJavaWithJavac FAILED
/platforms/android/app/src/main/java/cc/fovea/PurchasePlugin.java:307: error: method startServiceConnection in class PurchasePlugin cannot be applied to given types;
    startServiceConnection(() -> {
    ^
  required: Runnable,Runnable
  found: ()->{ if ([...]; } }
  reason: actual and formal argument lists differ in length
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
FAILURE: Build failed with an exception.

More info

Even though I am using "cordova-plugin-purchase": "^13.10.1" it is installing the latest tag which is "13.10.3" and not the latest release which is "13.10.1".
If I install it as exact version "cordova-plugin-purchase": "13.10.1" it is working fine.

@j3k0 j3k0 closed this as completed in 018c14e May 15, 2024
@j3k0
Copy link
Owner

j3k0 commented May 15, 2024

Looks like a new version of java do not like the implicit null value for last parameter. Fixed with last commit, preparing a new patch release.

@j3k0
Copy link
Owner

j3k0 commented May 15, 2024

Please try version v13.10.4

@marioshtika
Copy link
Author

marioshtika commented May 16, 2024

Hello @j3k0 v13.10.4 is working perfectly 👍
Thank you

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

2 participants