Here is my project layout.
Project MyLib - Android library project. It contains jni directory that creates libMyA.so.
Project MyMain - Android application project. In Eclipse, I have added MyLib as a dependent project from Properties-->Android-->Reference UI.
When Eclipse builds the .apk file, the problem is that it does not include libMyA.so.
As a workaround, I can manually copy MyLib\libs\armeabi\libMyA.so to MyMain\libs\armeabi\libMyA.so. Now, when the .apk file is built, it does contain the library file.
I am wondering if I missed some other setting that I should have specified.