private void onJSBundleLoadedFromServer() { File file = new File(JS_BUNDLE_LOCAL_PATH); if(file == null || !file.exists()){ Log.i(TAG, "download error, check URL or network state"); return; } Log.i(TAG, "download success, reload js bundle"); Toast.makeText(BaseReactActivity.this, "Downloading complete", Toast.LENGTH_SHORT).show(); try { Class<?> RIManagerClazz = mReactInstanceManager.getClass(); Method method = RIManagerClazz.getDeclaredMethod("recreateReactContextInBackground", JavaScriptExecutor.class, JSBundleLoader.class); method.setAccessible(true); method.invoke(mReactInstanceManager, new JSCJavaScriptExecutor(), JSBundleLoader.createFileLoader(getApplicationContext(), JS_BUNDLE_LOCAL_PATH)); } catch (NoSuchMethodException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (InvocationTargetException e) { e.printStackTrace(); } catch (IllegalArgumentException e) { e.printStackTrace(); } }