From 2be389461c1ab2492e1acde00b2886e188dcc720 Mon Sep 17 00:00:00 2001 From: "pengfei.zhou" Date: Fri, 5 Nov 2021 17:30:37 +0800 Subject: [PATCH] Android:use webview executor for fallback plan --- .../src/main/java/pub/doric/engine/DoricJSEngine.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/doric-android/doric/src/main/java/pub/doric/engine/DoricJSEngine.java b/doric-android/doric/src/main/java/pub/doric/engine/DoricJSEngine.java index 5cbe9465..3a65a58e 100644 --- a/doric-android/doric/src/main/java/pub/doric/engine/DoricJSEngine.java +++ b/doric-android/doric/src/main/java/pub/doric/engine/DoricJSEngine.java @@ -99,8 +99,11 @@ public class DoricJSEngine implements Handler.Callback, DoricTimerExtension.Time } protected void initJSEngine() { - mDoricJSE = new DoricWebViewJSExecutor(Doric.application()); - //mDoricJSE = new DoricNativeJSExecutor(); + try { + mDoricJSE = new DoricNativeJSExecutor(); + } catch (Exception e) { + mDoricJSE = new DoricWebViewJSExecutor(Doric.application()); + } if (mDoricJSE instanceof DoricWebViewJSExecutor) { loadBuiltinJS("doric-web.js"); }