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

Can't find UsbSerialPort.read by length during build #594

Open
itaigolan opened this issue Sep 12, 2024 · 1 comment
Open

Can't find UsbSerialPort.read by length during build #594

itaigolan opened this issue Sep 12, 2024 · 1 comment
Labels

Comments

@itaigolan
Copy link

I've been using the read without the length of the UsbSerialPort, ie. port.read(buffer, 10), and I've been able to read back the data I expect. However, when I change the read to use the length as well, ie. port.read(buffer,12, 10), the build fails with the error:
error: method read in interface UsbSerialPort cannot be applied to given types;

The dependency I'm using in my build.gradle is 'com.github.mik3y:usb-serial-for-android:3.8.0'. I also import jitpack.io as mentioned in the read me. Any help would be appreciated.

@kai-morich
Copy link
Collaborator

The Java error message 'cannot be applied to given types' typically provides some details why the types do not match. please check.

BTW: read with small size can cause issues (see here), so you better avoid that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants