How to copy numbered/versioned .so file during apk install

99封情书 提交于 2020-01-05 08:48:09

问题


I am using Android NDK to compile a library for Android. I successfully built the library and obtained the .so file. Wrote JNI wrappers and able to create an apk without any compilation errors.

My library depends on some other .so files. I manage to include them within the apk using the method described here. But the problem is, my library also depends on a numbered/versioned .so file, i.e. libxxx.so.9 and this file is not copied during apk installation. In other words, in my apk file, under lib/x86_64 folder, I have all .so files including the numbered one, libxxx.so.9, but after install, when I check app data from device shell, all .so files copied except the numbered one.

I read that I can put it under assets folder and move it under the correct location at first launch of the app, but is there a better way to place this file correctly without such a workaroud?

来源:https://stackoverflow.com/questions/31030863/how-to-copy-numbered-versioned-so-file-during-apk-install

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!