How to add a shared library to my APK?

2019-01-26 15:31发布

Pretty much exact duplicate of Add a native lib to an APK. Since there was no answer I decided to ask again.

I have an Android project. I have an .so library built with android NDK. And I want to use this .so in my project, preferrably - without using NDK.

So, how do I tell Eclipse (or Android tools) that I need certain .so to be built into my APK?

1条回答
Emotional °昔
2楼-- · 2019-01-26 16:02

It's actually easier than I expected. All I had to do is place the .so in libs/armeabi-v7a - Eclipse saw it and integrated into APK.

However, I've made this project by copying from another Eclipse project, which was actually building this .so from source. So, I think there were some settings that I would otherwise need to set. Feel free to add corrections or edit my answer.

查看更多
登录 后发表回答