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

No interface method pushMap #13

Open
theorime opened this issue Apr 28, 2021 · 5 comments
Open

No interface method pushMap #13

theorime opened this issue Apr 28, 2021 · 5 comments

Comments

@theorime
Copy link

Hello !
Thank you for your work, it's really amazing for what I'm doing !
But there's a problem since React Native 0.6 that cause this error on the call of getDeviceListAsync :

Screenshot_20210428_185608.jpg

This is caused by the fact that in RN > 0.6, the method WritableArray.pushMap() does not accept WritableMap as argument anymore. It accepts only ReadableMap. I tried to modify the code in order transform it, but my knowledge in RN is too limited to do so...

How can we get through this problem ?

Thank you !

@Nash171
Copy link

Nash171 commented May 15, 2021

I got the same issue. still looking for a solution :(

ps: I just saw your fix in your fork. Is that working well?
I will try to use it. Thanks

@vmaury
Copy link

vmaury commented Jun 30, 2021

I'd got same issue ...
After a lot of tries (note I'm VERY bad in java,maven and so on, I hate Java, that's the main reason I chose react to code ;-)), It works
You can find my realease here : http://vmaury.o2switch.net/tmp/react-native-usbserial.zip, feel free to modify it, and commit it somewhere

@vmaury
Copy link

vmaury commented Jun 30, 2021

Note that during this tries, I linked NOT with com.hoho.android:usb-serial-for-android:0.2.0-SNAPSHOT but with more recent com.github.mik3y:usb-serial-for-android:3.4.0 (I thought that was the bug source, no, but I think it's always better if It's linked with a more recent version).
In my buid.gradle, I also add

dependencies {
    implementation 'com.github.mik3y:usb-serial-for-android:3.4.0' 
... 
}

and

repositories {
  maven { url 'https://jitpack.io' }
}

@theorime
Copy link
Author

theorime commented Oct 4, 2021

I just tried it and it's working ! Thank you so much

@LjMax
Copy link

LjMax commented Mar 26, 2022

@vmaury or someone else, can you share a working solution, since link you posted doesn't work anymore?

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