Android JNA UnsatisfiedLinkError: Native library (com/sun/jna/xxx/libjnidispatch.so) not found

旧巷老猫 提交于 2019-12-02 12:57:05

Include the libjnidispatch.so shared library for all the Android ABIs that your project supports.

  • Navigate to JNA libraries.
  • Under Version 4.5.0, download the zip archive
  • Unzip the package, navigate to jna-4.5.0/dist/ directory. libjnidispatch.so for different ABIs can be extracted from respective jar file. The mapping is as below illustrated in below table.

    | JNA ABI             | Android ABI   |
    | ------------------- | ------------- |
    | android-aarch64.jar | arm64-v8a     |
    | android-armv7.jar   | armeabi-v7a   |
    | android-x86-64.jar  | x86_64        |
    | android-x86.jar     | x86           |
    
  • Put the libjnidispatch.so into the mapped Android ABI folder, for example, arm64-v8a, armeabi-v7a, x86 and x86_64.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!