我正在开发一个编译成 JAR 然后使用 javaws 部署的项目。在我的一个类(class)中,我需要加载设备上目录/system/lib/中的 libandroid_runtime.so。
我该怎么做?
System.load("libandroid_runtime")抛出 java.lang.UnsatisfiedLinkError: Expecting an absolute path of the library: libandroid_runtime
System.loadLibrary("/system/lib/libandroid_runtime.so") 抛出 java.lang.UnsatisfiedLinkError: Expecting an absolute path of the library:/system/lib/libandroid_runtime.so.
System.loadLibrary("android_runtime");抛出 java.lang.UnsatisfiedLinkError: java.library.path 中没有 android_runtime
谢谢!
最佳答案
I'm working on a project that gets compiled into a JAR and then deployed using javaws
Android 不使用 Java Web Start。
In one of my classes, I need to load the libandroid_runtime.so found in directory /system/lib/ on the device.
那是不可能的。您没有对 /system
的读取权限。
关于android - 如何加载 libandroid_runtime,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9220984/