Java.Lang.Runtime.LoadLibrary Method
Loads a shared library.

Syntax

[Android.Runtime.Register("loadLibrary", "(Ljava/lang/String;)V", "GetLoadLibrary_Ljava_lang_String_Handler")]
public virtual void LoadLibrary (string libName)

Parameters

nickname
the name of the library to load.

Exceptions

TypeReason
Java.Lang.UnsatisfiedLinkErrorif the library can not be loaded, either because it's not found or because there is something wrong with it.

Remarks

Loads a shared library. Class loaders have some influence over this process, but for a typical Android app, it works as follows:

Given the name "MyLibrary", that string will be passed to JavaSystem.MapLibraryName(string). That means it would be a mistake for the caller to include the usual "lib" prefix and ".so" suffix.

That file will then be searched for on the application's native library search path. This consists of the application's own native library directory followed by the system's native library directories.

[Android Documentation]

Requirements

Namespace: Java.Lang
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1