mirror of
https://github.com/status-im/react-native.git
synced 2025-02-28 09:00:55 +00:00
Fallback to System.loadLibrary if SoLoader has not been initialized
Reviewed By: lucasr Differential Revision: D3661990 fbshipit-source-id: f2003577aa3d2f89ec579b6f889fdfb684110b60
This commit is contained in:
parent
5fd6c0903e
commit
44e7a88620
@ -20,7 +20,13 @@ import com.facebook.soloader.SoLoader;
|
||||
public class CSSNodeJNI implements CSSNodeAPI<CSSNodeJNI> {
|
||||
|
||||
static {
|
||||
SoLoader.loadLibrary("csslayout");
|
||||
try {
|
||||
SoLoader.loadLibrary("csslayout");
|
||||
} catch (Exception ignored) {
|
||||
// The user probably didn't call SoLoader.init(). Fall back to System.loadLibrary() instead.
|
||||
System.out.println("Falling back to System.loadLibrary()");
|
||||
System.loadLibrary("csslayout");
|
||||
}
|
||||
}
|
||||
|
||||
private CSSNodeJNI mParent;
|
||||
|
Loading…
x
Reference in New Issue
Block a user