gpt4 book ai didi

java - 在 Android 上使用 BridJ 时出现 UsatisfiedLinkError

转载 作者:行者123 更新时间:2023-12-01 05:06:18 25 4
gpt4 key购买 nike

目前我正在使用 Android 版 BRIDj-0.6.1-android.jar。问题是该库显示不满足的链接错误,如下所示:

09-27 17:51:58.740: E/AndroidRuntime(12589): Caused by: java.lang.ExceptionInInitializerError
09-27 17:51:58.740: E/AndroidRuntime(12589): at java.lang.Class.newInstanceImpl(Native Method)
09-27 17:51:58.740: E/AndroidRuntime(12589): at java.lang.Class.newInstance(Class.java:1472)
09-27 17:51:58.740: E/AndroidRuntime(12589): at org.bridj.BridJ.getRuntimeByRuntimeClass(BridJ.java:233)
09-27 17:51:58.740: E/AndroidRuntime(12589): at org.bridj.BridJ.getRuntime(BridJ.java:264)
09-27 17:51:58.740: E/AndroidRuntime(12589): at org.bridj.BridJ.register(BridJ.java:287)
09-27 17:51:58.740: E/AndroidRuntime(12589): at org.bridj.BridJ.register(BridJ.java:161)
09-27 17:51:58.740: E/AndroidRuntime(12589): at com.g5.jna.crypto.LibcryptoLibrary.<clinit>(LibcryptoLibrary.java:20)
09-27 17:51:58.740: E/AndroidRuntime(12589): ... 6 more
09-27 17:51:58.740: E/AndroidRuntime(12589): Caused by: java.lang.ExceptionInInitializerError
09-27 17:51:58.740: E/AndroidRuntime(12589): at org.bridj.CRuntime.<clinit>(CRuntime.java:450)
09-27 17:51:58.740: E/AndroidRuntime(12589): ... 13 more
09-27 17:51:58.740: E/AndroidRuntime(12589): Caused by: java.lang.UnsatisfiedLinkError: sizeOf_ptrdiff_t
09-27 17:51:58.740: E/AndroidRuntime(12589): at org.bridj.Platform.sizeOf_ptrdiff_t(Native Method)
09-27 17:51:58.740: E/AndroidRuntime(12589): at org.bridj.Platform.<clinit>(Platform.java:149)

我已将 libcrypto.so 文件保存在 Android 项目的 lib/armeabi/ 路径中。

如何解决这个问题?

最佳答案

有一个关于此的未解决问题: https://github.com/ochafik/nativelibs4java/issues/335

关于java - 在 Android 上使用 BridJ 时出现 UsatisfiedLinkError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12620988/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com