开发者

Trying a canned program and getting an exception Unsatisfied Link Error

I seem to be in over my head. I have been trying to change the Linux TTY serial ports on the Android to work as regular serial ports (in and out). After struggling for a while, I found the following web page:

http://code.google.com/p/android-serialport-api/

I decided that instead of reinventing the wheel, I would copy the android-serialport-api project on

http://code.google.com/p/android-serialport-api/source/browse/#svn%2Ftrunk%2Fandroid-sercd%253Fstate%253Dclosed

and try to make it work. I built it using Eclipse. It built without error.

This is a project to demo the kernel that allows writing to the Linux TTY serial ports. I开发者_C百科 ran the app using debug and a menu came up just fine. I selected Setup on the menu and the app worked just fine. Then I selected Console and I got the following error: Thread[<1>main](Suspended (exception Unsatisfied Link Error])

Hmm, this seems to say to me that there is some kind of dynamic link library that is not available. Would this be something in the Linux Kernel? I know that the kernel will load modules dynamically.

Would this be related to the libserial_port.so file under project/libs/armeabi? Do I have to load this library file into Linux somehow? Is there some tool for doing this? I have successfully loaded the modified kernel (serial.img) using fastboot. Do I have to load the above file after (during?) loading the modified kernel? Any clues would be appreciated.

The web page seems to assume a lot of knowledge that I lack. Does someone have links to pages (or books) that would fill in this knowledge?

Thanks!


Most likely the unatisfied link error is occuring because the native library is not getting packaged in your apk and then unpackaged in the right place on the device when the apk is installed. It could also be that the library depends on a system library that was present on an earlier device but is not available on yours (ie, they used something that was not a public interface). To know for sure, you will need to look in the logcat log.

They also have a precompiled APK you might try.

In addition to the kernel, they also seem to be providing a modified ramdisk image, likely to create the serial device files upon boot and/or chmod them to make them available to non-root userids.

In truth, your best avenue for support with that project is likely the project maintainers. People here can speculate from general principles, but without taking an hour to read through all their code, its just speculation.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜