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"); }