Recently, I am working on multimedia development on Android. I use the JNI interface to call various underlying libraries, such as lib ***. So.
As shown below, loading is always unsuccessful. Debugging found that each time the so library is loaded, it will jump to the catch Exception Handling Section and print the exception log information.
1. Static {
2. Try {
3. system. Load ("/data/COM. ***/lib ***. So ");
4 .}
5. Catch (unsatisfiedlinkerror ulink ){
6. log. I ("hvnative ===", "can not Load Library ");
7. ulink. printstacktrace ();
8 .}
9 .}
You can use the arm-None-Linux-gnueabi-LD tool to analyze the dynamic library on the Internet, and install arm-None-Linux-gnueabi-GCC on Ubuntu 10.04.
Method reference:
Http://blog.csdn.net/satiling/article/details/6914466
Find the arm-None-Linux-gnueabi-LD execution program and add it to the system environment variable:
1. Vim/root/. bashrc
2. Path = $ path: absolute path
3. Source/root/. bashrc make the environment variable take effect immediately, and the analysis tool is done!
If the function printed after "undefined reference to" is:
1. if you write a function, you should check whether the code you have written has any problems. After modification, recompile the underlying library;
2. the system function has not found a proper solution for the moment. I am trying to find a solution by surfing the Internet.