Android System.Load vs System.LoadLibrary

In fact, the differences between system. Load and system. Loadlibrary have been discussed in many places on the Internet

http://stackoverflow.com/questions/7016391/difference-between-system-load-and-system-loadlibrary-in-java

The official document also has a detailed introduction:

In short, system. Load should take the absolute path of so; The system. Loadlibrary should not have a path, and it should not have a lib prefix and a. So suffix. For example, you have an app with a package of com. Test. Demo and a libtest. So

Then, you can load it like this:
1. System. Load (getapplicationinfo(). Nativelibrarydir + “/ libtest. So”)

2. System.LoadLibrary(“test”);

PS:nativeLibraryDir added in API 9.

Similar Posts: