下面列出了com.facebook.react.bridge.JavaScriptExecutorFactory#com.facebook.hermes.reactexecutor.HermesExecutorFactory 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
private JavaScriptExecutorFactory getJSExecutorFactory() {
try {
String appName = Uri.encode(parentContext.getPackageName());
String deviceName = Uri.encode(getFriendlyDeviceName());
// If JSC is included, use it as normal
SoLoader.loadLibrary("jscexecutor");
return new JSCExecutorFactory(appName, deviceName);
} catch (UnsatisfiedLinkError jscE) {
// Otherwise use Hermes
return new HermesExecutorFactory();
}
}