diff --git a/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java b/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java index e3852c7..ffcabf4 100644 --- a/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java +++ b/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java @@ -290,9 +290,9 @@ public class RNCWebViewManager extends SimpleViewManager { if (ctx != null) { //view.getSettings().setAppCachePath(ctx.getCacheDir().getAbsolutePath()); //view.getSettings().setAppCacheEnabled(true); - Util.invokeMethodIfExists(settings, "setAppCachePath", ctx.getCacheDir().getAbsolutePath()); + Util.invokeMethodIfExists(view.getSettings(), "setAppCachePath", ctx.getCacheDir().getAbsolutePath()); view.getSettings().setCacheMode(WebSettings.LOAD_DEFAULT); - Util.invokeMethodIfExists(settings, "setAppCacheEnabled", true); + Util.invokeMethodIfExists(view.getSettings(), "setAppCacheEnabled", true); } } else { view.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);