Caused by: java.lang.UnsatisfiedLinkError: Cannot load library

第三方应用调用系统SO 库失败Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: library 在Android 31平台,尝试使用第三方应用调用系统SO 库,会报如下的错误 Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: library "/system/lib64/XXX.so" needed or dlopened by "/apex/com.android.art/lib64/libnativeloader.so" is not accessible for the namespace "classloader-namesp 阅读详情

when I tried to package an old cocos2dx NDK project, I encountered this problem, apk could be exported but crashed when start running it.

Here is the log I get from eclipse logcat:

FATAL EXCEPTION: main
java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library[1521]:   492 unknown reloc type   160 @      (60218)
	at java.lang.Runtime.loadLibrary(Runtime.java:434)
	at java.lang.System.loadLibrary(System.java:554)
	at org.cocos2dx.lib.Cocos2dxActivity.onLoadNativeLibraries(Cocos2dxActivity.java:246)
	at org.cocos2dx.lib.Cocos2dxActivity.onCreate(Cocos2dxActivity.java:260)
	at org.cocos2dx.phonegame.PhoneGameActivity.onCreate(PhoneGameActivity.java:83)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
	at android.app.ActivityThread.access$1500(ActivityThread.java:117)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:130)
	at android.app.ActivityThread.main(ActivityThread.java:3683)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:507)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:880)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:638)
	at dalvik.system.NativeStart.main(Native Method)

First, I clean the project and rebuild it. but the problem is still there.

Then, I find another project and rewrite the Android.mk file under jni folder, but still not ok.

I don't think it's the problem with ndk version, because other project with the same ndk could run perfectly.

At last, I rewrite the Application.mk file under jni folder, this time the ndk compiler rebuild the libc++_static.a and everything is ok.

In a word, this problem in my case is caused by old wrong libc++static.a lib, and only clean the project and rebuild cannot update it.


Solution: Change the Application.mk and force the libc++static.a to be rebuild.
(ps:Maybe delete the obj folder could also make it.)

解决JDK17/21 java.lang.UnsatisfiedLinkError: /usr/local/jdk17/lib/libfontmanager.so: libfreetype.so.6 java.lang.UnsatisfiedLinkError: /usr/local/jdk17/lib/libfontmanager.so: libfreetype.so.6: 无法打开共享对象文件没有这样的文件或目录。字体直接从win11复制字体放进来即可,不知道咋搞的直接私信老夫。本人Dockerfile脚本(小伙伴们,你们好呀,我是老寇。写的不是优雅 0.0。 阅读详情

相关推荐

从jdk1.8升级到jdk17踩过的所有坑的总结

再运行maven命令之前,加入下面vm参数,英文exec-maven-plugin运行的时候不是独立的jvm process.如果是运行maven命令时报错,升级maven-compiler-plugin并加下面vm的参数。既不能升级sybDriver也不能fix , 最后只能remove了。Garbage Collector不能用了。如果是启动报错的话直接下面所有的vm的参数。升级gmaven-plugin.要把dependency全去掉。

Harry的博客 4741

java -虹软Caused by: java.lang.UnsatisfiedLinkError: Can‘t load library: **\WIN64\libarcsoft_face.dll

错误详情 Caused by: java.lang.UnsatisfiedLinkError: Can’t load library: F:\code\WIN64\libarcsoft_face.dll 如图: 错误原因 一般遇到问题,我都是直接copy百度搜索解决方案,网上教程说的出错原因可能是: 缺失C++ DLL库,需要下载安装。 依赖文件放置路径错误,需要在当前程序目录、系统system32目录、环境变量目录等等。(但是没用) 后来,看了下出错原因 说我在指定目录无法加载*.dll文件,我

影修 3496

【故障排查】telnet连接失败:端口23不可达的深度分析与解决方案

本文深度解析telnet连接失败时端口23不可达的常见原因与解决方案。从快速自查目标地址、端口到服务端排查,涵盖服务状态检查、防火墙配置及安全组设置,并提供进阶诊断工具与抓包分析方法。文章强调telnet协议的安全风险,建议在生产环境中改用SSH等加密协议进行远程管理。

weixin_28323057的博客 394

java 17运行jar报错:java.lang.UnsatisfiedLinkError: Can‘t load library:

于是重新安装了下openjdk17。发现jar包也能正常运行了。此时发现这个文件存在了。

ZEEKLING 2429

SCS 43. 利用Scissor算法从单细胞数据中挖掘临床表型关联的细胞亚群

本文详细介绍了Scissor算法在单细胞转录组数据分析中的应用,该算法能够精准挖掘与临床表型关联的细胞亚群。通过建立单细胞RNA测序数据与临床预测模型的直接关联,Scissor避免了传统聚类方法的局限性,为疾病机制研究和个性化医疗提供了新工具。文章还涵盖了数据预处理、模型选择、结果验证等实战技巧。

weixin_28736335的博客 492

实现单芯片2400bps 音频编解码方案

终于按照朋友的需求,帮他开发了一款单芯片集音频采集编码传送并接收解码播放功能的方案,交给快递公司邮寄给远在郑州的他.整个项目从开始定型到现在一个样机送出,整整花了1个月时间,感觉挺有成就感,挺有意思,工作是辛苦的,结果却是快乐的.现在将这中快乐的的心情与大家分享一下.    真个项目用一颗主控搞定,ARM9的,200KBytes 片内RAM,主频可以跑到300MHz,64pin LQFP封装

nyxsec的专栏 3684

Caused by java.lang.UnsatisfiedLinkError Cannot load library

Caused by: java.lang.UnsatisfiedLinkError: Cannot load library在使用NDK调用C++代码编译而成的链接库文件的时候,有时候会出现链接错误。出现这种错误的原因大多是与环境有关,网上也有针对各种不同情况的解决办法。比如必须将*.so文件放置到libs/armeabi文件夹下,或许还需要新建”libs/armeabi-v7a” 目录,把动态库

流动的城市的博客 4464

AI上推荐 之 隐语义模型(LFM)和矩阵分解(MF)

1. 前言 随着信息技术和互联网的发展, 我们已经步入了一个信息过载的时代,这个时代,无论是信息消费者还是信息生产者都遇到了很大的挑战: 信息消费者:如何从大量的信息中找到自己感兴趣的信息? 信息生产者:如何让自己生产的信息脱颖而出, 受到广大用户的关注? 为了解决这个矛盾, 推荐系统应时而生, 并飞速前进,在用户和信息之间架起了一道桥梁,一方面帮助用户发现对自己有价值的信息, 一方面让信息能够展现在对它感兴趣的用户前面。 推荐系统近几年有了深度学习的助推发展之势迅猛, 从前深度学习的传统推荐模型(协

Miracle8070 1万+

tesseract报错java.lang.UnsatisfiedLinkError: Unable to load library 'tesseract': Native library解决方法

这个错误原因是在服务器上没有安装tesseract   如果服务器是ubuntu,那么运行下面这个命令: sudo apt-get install tesseract-ocr 服务器是centOS的话,查了许多资料,看似解决起来很麻烦,但是实际上只运行下面这个命令即可: yum install tesseract   参考了好多资料,链接放在下面,如果上面的方法解决不了就去下面的...

zhichicao的博客 5865

4、LTE无人机认证:保障通信安全的新方案

本文针对LTE网络中无人机通信存在的安全风险,提出了一种基于可信第三方GCS的新型认证协议。该协议通过非对称加密和哈希函数保护IMSI等敏感信息,防止身份泄露、中间人攻击、拒绝服务攻击和位置追踪等威胁。利用Scyther工具对协议进行形式化分析,验证了其在机密性、一致性和活性等方面的安全属性,证明该方案能有效提升无人机在LTE网络中的通信安全性与隐私保护能力。

pink的博客 60

华东理工大学计算机预推免面试

华东理工大学预推免面试经验分享

D1379951481的博客 1402

Caused by java lang UnsatisfiedLinkError Couldn't load Bai

Caused by java lang UnsatisfiedLinkError Couldn't load Bai

sfhinsc的博客 413

Obsidian与RAG:知识管理的未来之战

摘要: 本文对比了传统RAG、Obsidian和llm-wiki-skill三种知识管理方案。传统RAG依赖查询时临时检索,知识无法积累;Obsidian需人工整理,成本高但结构化强;llm-wiki-skill通过AI在摄入时自动编译知识为结构化Wiki,实现持续增值。核心差异在于知识处理时机——llm-wiki-skill将"查询时检索"转变为"摄入时编译",通过三层Markdown结构(sources/concepts/entities)和自动双向链接构建可进化

ZhangJiqun&191cm&85kg 620

问题:java.lang.UnsatisfiedLinkError: no jniopencv_core in java.library.path

一、问题 今天的程序在一台新电脑上运行,出现java.lang.UnsatisfiedLinkError: no jniopencv_core in java.library.path异常, 具体报错日志: Exception in thread "Thread-12" java.lang.UnsatisfiedLinkError: no jniopencv_core in java.library.path at java.lang.ClassLoader.loadLibrary(Unknown Sour

wdcyf15的博客 4486

NVIDIA Isaac Sim 联合 VS Code 开发调试环境配置

在 Visual Studio Code (VS Code) 中打开 Isaac Sim 软件包主文件夹,即可打开该工作区。注意建议在学习教程和示例时使用 Visual Studio Code。另请参见有关 VS Code 工作区的详细信息,请参阅 Visual Studio Code (VS Code) 文档。

2506_90492529的博客 3104

SAP B1中文培訓教材_SDK

公司内部培训资料,对开发工具 ,DIAPI, UIAPI,Add-ON有详细解说

Caused by: java.lang.UnsatisfiedLinkError: Couldn't load 。。。。

最近需要做个有地图搜索功能的模块,用到百度地图SDK,但是从官网上下载SDK后导入工程,修改apiKey后,还是无法运行,总是抱这个错误:Caused by: java.lang.UnsatisfiedLinkError: Couldn't load locSDK_3.1: findLibrary returned null,找了好多资料都无解,其中有篇博客提到类似的问题Caused b...

305

迈瑞BS系列全自动生化分析仪LIS协议接口手册(内含HL7和ASTM)

迈瑞BS系列全自动生化分析仪LIS协议接口手册,内含HL7和ASTM)

java.lang.UnsatisfiedLinkError: no xxx in java.library.path排查办法

遇到问题: 今天在用户现场使用JNI调用同事封装好的DLL时,出现报错 java.lang.UnsatisfiedLinkError: no xxx in java.library.path 从字面上的理解是没有加载到这个DLL文件。 问题排查: 加载代码如下: System.loadLibrary("callDll"); 意思是加载名字叫“callDll”的动态链接库 其实还...

肉段_Dxd的博客 8142

温度PID控制PLC程序

温度PID稳定控制程序,适用于欧姆龙PLC,对其他PLC也具有很大参考价值

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

JNA异常java.lang.UnsatisfiedLinkError: Unable to load library处理方法

今日遇到此问题:JNA异常java.lang.UnsatisfiedLinkError: Unable to load library 代码如下: public class IcMultiApp implements IIcMultiApp{ public interface IIcMultiApp extends Library { String sep = File.sep

biaochezu的专栏 1万+

java.lang.UnsatisfiedLinkError: Unable to load library

jna导入DLL总是出现,如下这样的错误,    Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load library ' test/test.dll ': ???????¨ 可能的原因:    1.路径不对,改对路径就行了。    2.jdk是64位的也会出现这个问题,换成32位的就OK了。

zdnlp的专栏 2583

Java下出现异常Unable to load library的解决思路

最近在编译Spatialite,查看Akka的ZeroMQ的demo程序是,容易出现Unable to load library

shihuacai的专栏 3万+

UnsatisfiedLinkError: Cannot load library

06-26 11:28:00.110: E/AndroidRuntime(30832): Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: link_image[1963]:  1582 could not load needed library 'libgameproxy.so' for 'libcocos2dcp

kevinyuyu的专栏 1359

Native.loadLibrary Caused by: java.lang.UnsatisfiedLinkError: Unable to load library

JAVA Native加载dll库,把库路径换成绝对路径还是出现下面的问题 Caused by: java.lang.UnsatisfiedLinkError: Unable to load library XXX 找了半天原因,原来是绝对路径的分隔符有问题。 String classpath = Thread.currentThread().getContextClassLoader().

daihui05的专栏 1万+

Caused by: java.lang.UnsatisfiedLinkError: Couldn't load zbar: findLibrary returned null

如果你用了shareSDK 并且你还使用了其他的第三方,里面包含so文件文件,但是出现了如下的异常:12-21 18:10:36.500 4843-5026/com.sanyuan.ehuizhan E/AndroidRuntime: FATAL EXCEPTION: Thread-1274 12-21 18:10:36.500 4843-5026/com.sanyuan.ehuizhan E/An

Blue的博客 1577

Caused by: java.lang.UnsatisfiedLinkError: Couldn't load litedes from loader dalvik.system.PathClas

Caused by: java.lang.UnsatisfiedLinkError: Couldn't load litedes from loader dalvik.system.PathClassLoader[dexPath  解放办法 在libs下面创建一个armeabi-v7a文件夹 把armeabi *.so的文件复制一份放在armeabi-v7a运行测试通过

wcx327038192的专栏 3686

java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons解决方法

解决方法 ln -s /usr/lib/jni/libswt-* ~/.swt/lib/linux/x86_64/

cjwang的专栏 1万+

java.lang.UnsatisfiedLinkError: Could not load SWT library.

java.lang.UnsatisfiedLinkError: Could not load SWT library.

qq 117791303 775
上一篇: SDUT3371 解题报告
下一篇: mshta usage
SingingCoder
博客等级 码龄15年 9粉丝 32原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值