Wednesday, April 9, 2014

call so files in android


1 can be dynamically loaded so files (ie, so the file is not placed in the lib directory, but sd inside), and if so, how call a function? This document is designed for android so compiled.

2 If the above functions can not be achieved, can be initialization function in the program, so that android system itself so file to load, and then call

Under 3 documents for a dynamic call so that the file is not packaged so in the case of the program, have it any other solution?

Please elaborate or give a link, thank you, not a long time to learn android, ndk is not used.

<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
Someone help? Master where to go
Reply:
jni

System. LoadLibrary loaded, jvm will do their own judgment, dll or so files


Reply:
Landlord. I think that probably is not enough.
Reply:
There are elaborate under a master? Thanks?
Reply:
Could be a feature in the program initialization
Reply:
references, 5th Floor konanwa23 reply:
Can Be initialization function in the program


What does it mean
Reply:
Try:
System.loadlibrary ("/ mnt / sdcard / folder / name.so")
Or
System.loadlibrary ("/ mnt / sdcard / folder / libname.so")
If not, you can tell JVM path so where, PathClassLoader loads so from two locations, one path is fixed, it may be:
lib / / lib . so, another path in the system properties defined, its key is java.library.path
Reply:
Can not load library,
directly from the sdcardYou can be copied to / data / data / package name / files / below, and then load the library,
Then you can jni layer load, you can. Loadlibrary only need the library name, load function is the absolute path in java layer.
Reply:
Upstairs copied to tell me how to / data / data / package name / lib / below it? Jia
Reply:
Into the data / data / .. directory does not work, I also have this problem has not been resolved, they shelved.

No comments:

Post a Comment