mik3y / usb-serial-for-android

Android USB host serial driver library for CDC, FTDI, Arduino and other devices.
MIT License
4.81k stars 1.58k forks source link

Having issues using the SerialInputOutputManager class #516

Closed mfran89 closed 1 year ago

mfran89 commented 1 year ago

Currently I am trying to use the SerialInputOutputManger class that comes with implementation 'com.github.mik3y:usb-serial-for-android:3.5.1'. But I am unable to call some of the setters that are supposed to be available such as start(), setReadTimeout() and others. So I opened the class file to see why this was the case and realized the class file I have does not match the java file that is on the online repo for this class . Which makes me think that somehow I am pulling the wrong version of the code . I followed the instructions to properly update the build.gradle file to include the repo and I have attached the class code in this message.

Let me know if I am doing something wrong , look forward to hearing back. SerialInputOutputManager.txt

kai-morich commented 1 year ago

how do you import the library? As mentioned in quick start or did you copy as subfolder into your project?

mfran89 commented 1 year ago

I followed the steps in the quick start 1.Add jitpack.io repository to your root build.gradle which I assume is the build.gradle in app folder

  1. Add library
    dependencies {
    implementation 'com.github.mik3y:usb-serial-for-android:3.5.1'
    }
kai-morich commented 1 year ago

the decompiled class file is from an older version, maybe something is wrongly cached in Android Studio, gradle, ... Please try File -> Invalidate Caches, Build -> Clean Project, ... in Android Studio

mfran89 commented 1 year ago

Sorry I thought I responded to this last message. I did do the following steps you mentioned

  1. Invalidate Caches
  2. Clean project
  3. Build Project

I am still not seeing the solution. For now it's not a big issue for me but I am curious if others have run into this issue. I dont understand how I could have gotten a older version, but I am sure it has something to do with my IDE if no one else has run into this problem.