2

I am working on the USB serial. I want to make a Nexus to read data from USB.

I found the example project to do it. here

So, I cloned the project and complied with eclipse. Everything works well but I got this warning, and I tried to connect my usb to the Nexus by serial port. However, it cannot find my usb. I don't know maybe it's because the warning.

I searched and found some recommendations but they don't work for me.

Furthermore, I have add my usb's product-id and vendor-id to a xml file.

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <usb-device vendor-id="1516" product-id="8628" />
</resources>

Could you help me find it out?

enter image description here

Thank in advance!

lvarayut
  • 13,963
  • 17
  • 63
  • 87

1 Answers1

3

Are you using the UsbSerialLibrary as a Library for your main project? In that case please go to:

Main project's properties -> build path -> projects tab 

and make sure to remove the UsbSerialLibrary from that place. You should make sure it is present in

Main project's properties -> android -> Library

If it is not there, please select add and that should be it. Hope this helps to remove that warning. Cheers!

unbekant
  • 1,555
  • 22
  • 31
  • Thank you @unbekant, It works well !!. Have you ever worked on this project? Can I ask you some questions? My app can be installed as well. But it always show "No serial device". It cannot find my USB. I don't know why. :( – lvarayut Apr 27 '13 at 15:08
  • Now, I found that the number of a vendor_id and a product_id should be in hex. I can found my USB. However, I keep forward to make it able to read data. – lvarayut Apr 27 '13 at 15:31
  • @Willy Glad that made it! Unfortunately I haven't worked with that project but that warning is very common in any project using libraries. Good luck! :) – unbekant Apr 27 '13 at 15:35
  • don't worry. Thank you for your help ! I appreciate. – lvarayut Apr 27 '13 at 15:41