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: method save in class Canvas cannot be applied to given types; (when upgrading to react-native 0.59.5) #44

Open
killynathan opened this issue May 2, 2019 · 6 comments

Comments

@killynathan
Copy link

Hi januslo,

When updating to react-native 0.59.5, we encountered the following error:

/node_modules/react-native-sunmi-inner-printer/android/src/main/java/com/sunmi/innerprinter/BitmapUtils.java:468: error: method save in class Canvas cannot be applied to given types;
                  canvas.save(Canvas.ALL_SAVE_FLAG); 
                        ^
  required: no arguments
  found: int
  reason: actual and formal argument lists differ in length
1 error

Upon researching, this seems to come from the fact that starting from Android SDK API 28, you cannot pass an int into canvas.save anymore. Is there any way you can help us with this?

Much thanks.

@leakhand
Copy link

Hi januslo,

When updating to react-native 0.59.5, we encountered the following error:

/node_modules/react-native-sunmi-inner-printer/android/src/main/java/com/sunmi/innerprinter/BitmapUtils.java:468: error: method save in class Canvas cannot be applied to given types;
                  canvas.save(Canvas.ALL_SAVE_FLAG); 
                        ^
  required: no arguments
  found: int
  reason: actual and formal argument lists differ in length
1 error

Upon researching, this seems to come from the fact that starting from Android SDK API 28, you cannot pass an int into canvas.save anymore. Is there any way you can help us with this?

Much thanks.

You can pull from my branch to fix this case

https://github.com/leakhand/react-native-sunmi-inner-printer/tree/fix/canvas

@killynathan
Copy link
Author

@leakhand any interest of putting it on npm?

@leakhand
Copy link

@leakhand any interest of putting it on npm?

I've waited for the repository owner do merge request first

@januslo
Copy link
Owner

januslo commented May 21, 2019

@leakhand merged

@killynathan
Copy link
Author

killynathan commented May 22, 2019

@januslo thanks so much for your support. Can you please update npm to have this version?

@datvp09
Copy link

datvp09 commented Jun 17, 2019

please release new version, still having this issue

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

4 participants