简体   繁体   English

android-arm/libjnidispatch.so 未找到错误

[英]android-arm/libjnidispatch.so not found error

In my app, I am adding third party hardware connectivity and using their provided code for java.在我的应用程序中,我添加了第三方硬件连接并使用他们提供的 java 代码。 Also using jna.jar to interact with that code as it uses native library to load some .so files.还使用jna.jar与该代码交互,因为它使用本机库加载一些.so文件。 It throws the error:它抛出错误:

 java.lang.UnsatisfiedLinkError: Native library (com/sun/jna/android-arm/libjnidispatch.so) not found in resource path (.) Please help where can I get the jar with android-arm/libjnidispatch.so in it.`

I tried adding android-arm.jar which is having libjnidispatch.so separately but compiler is looking for jna.jar's path.我尝试添加 android-arm.jar ,它单独具有 libjnidispatch.so 但编译器正在寻找 jna.jar 的路径。 Thanks!谢谢!

  1. Extract the com/sun/jna/linux-arm/libjnidispatch.so from the jar file从 jar 文件中提取 com/sun/jna/linux-arm/libjnidispatch.so
  2. put the .so file in the following directory (when using android studio): yourproject\\app\\src\\main\\jniLibs\\armeabi-v7a\\libjnidispatch.so将 .so 文件放在以下目录中(使用 android studio 时): yourproject\\app\\src\\main\\jniLibs\\armeabi-v7a\\libjnidispatch.so

And also please note that linux architecture != android architecture (google uses a different c library (bionic), which is a different one than the normal linux distributions) For all architectures see:还请注意 linux 架构 != android 架构(谷歌使用不同的 c 库(仿生),这与普通的 linux 发行版不同)对于所有架构,请参见:

https://github.com/java-native-access/jna/tree/master/lib/native https://github.com/java-native-access/jna/tree/master/lib/native

Which version of JNA do you use?您使用哪个版本的 JNA? (There was a bug in JNA 4.2.2 /4.3.0 which might also be a cause) (JNA 4.2.2 /4.3.0 中存在一个错误,这也可能是一个原因)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 com / sun / jna / android-arm / libjnidispatch.so在资源路径中找不到 - com/sun/jna/android-arm/libjnidispatch.so not found in resource path 在资源路径中找不到 JNA 原生支持 (/com/sun/jna/linux-arm/libjnidispatch.so) - JNA native support (/com/sun/jna/linux-arm/libjnidispatch.so) not found in resource path 在资源路径中找不到本机库(com / sun / jna / android-aarch64 / libjnidispatch.so) - Native library (com/sun/jna/android-aarch64/libjnidispatch.so) not found in resource path UnsatisfiedLinkError:在资源路径 (.) 中找不到本机库 (com/sun/jna/android-x86-64/libjnidispatch.so) - UnsatisfiedLinkError: Native library (com/sun/jna/android-x86-64/libjnidispatch.so) not found in resource path (.) 在aarch64 Odroid C2上的Java 1.8.0_73上运行WebStorm-143.382.36在libjnidispatch.so上失败 - Running WebStorm-143.382.36 on Java 1.8.0_73 on aarch64 Odroid C2 fails on libjnidispatch.so Android运行时错误:找不到库'libmmparser.so' - Android runtime error: Library 'libmmparser.so' not found 在Android应用程序上加载现有共享库(.so)时出错(找不到unsatisfiedlinkerror本机方法) - Error loading existing shared library (.so) on Android app (unsatisfiedlinkerror native method not found) “在类中找不到主要方法...”,但是在那里? 那为什么会出错呢? - “Main method not found in class…” but it is there ?? so why the error? 错误:在Android中找不到源 - Error: Source not found in Android 找不到类错误Android - Class Not Found Error Android
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM