Reputation: 59680
I have a so file named libJSA.so
in memory card in android and wanna load it in my application.
How can i load this file using System.loadLibrary("libname");
?
Things i have tried:-
/system/lib
. ---- Not worked System.loadlibrary("/mnt/sdcard/folder/libJSA.so");
-------- Not workedUpvotes: 2
Views: 8305
Reputation: 1
Try removing "lib" prefix.
If your library name is "libJSA.so", try to use System.loadLibrary ("JSA");
Upvotes: 0
Reputation: 11
System.loadlibrary("/mnt/sdcard/folder/libJSA.so"); // Not working
try:
System.loadLibrary ("JSA.so");
not (java is ase sensitive):
System.loadlibrary("JSA.so")
or instead try
Static{
System.load("/sdcard/folder/libJSA.so");
}
put this inside the class and outside onCreate
.
Upvotes: 1
Reputation: 10106
AFAIK, unless it's a system library or you are on a rooted device, you can't load any libraries that are outside your signed APK bundle, meaning what you want to do can't be done.
Upvotes: 1