How to integrate native runtime library with dlopen on NDK?

后端 未结 1 1533
情深已故
情深已故 2020-12-19 07:59

For my native c++ project I\'ve to set up a runtime loading of a precompiled shared library, which could be changed by client side on start up using configurations. What is

相关标签:
1条回答
  • 2020-12-19 08:40

    The best strategy on Android is to load all native libraries from Java, even if you choose which libraries to load, by some runtime rules. You can use dlsym(0, ...) then to access exported functions there.

    APK builder will pick up all .so files it finds in libs/armeabi-v7a and the installer will unpack them into /data/data/<your.package>/lib directory.

    0 讨论(0)
提交回复
热议问题