dlopen failed: library "/system/lib/libxxx.so" needed or dlopened by "/system/lib/libnativeloader.so

Android 加载so库:dlopen failed: library “/system/lib/libSpiDevice.so” needed or dlopened by “/system/lib/libnativeloader.so” is not accessible for the namespace “classloader-namespace”

简易说明我的解决方法,不代表一定可以解决.

1.将需要调用的libSpiDevice.so放到/system/lib下,
2.运行程序发现报错,百度一查说是要把改so库的名字写到/system/etc/public.libraries.txt,这个文件里
3,adb pull出来,修改,adb push进去,重启;

重点来了:将libSpiDevice.so加到public.libraries.txt这个文件时,注意要换行,换行,换行!!!,否则push到系统中是识别不到的,cat public.libraries.txt,会发现根本没有刚添加的字段…这就是没有换行.所以,记得换行,换行,换行.
dlopen failed: library

你可能感兴趣的:(Android)