diff --git a/android/build.gradle b/android/build.gradle index e6d05084b..9aaf91f89 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -9,7 +9,7 @@ buildscript { if (project == rootProject) { repositories { google() - jcenter() + mavenCentral() } dependencies { @@ -18,7 +18,7 @@ buildscript { } } else { repositories { - jcenter() + mavenCentral() } dependencies { @@ -35,6 +35,7 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' android { + namespace "com.reactnativecommunity.webview" compileSdkVersion getExtOrIntegerDefault('compileSdkVersion') buildToolsVersion getExtOrDefault('buildToolsVersion') defaultConfig { @@ -52,14 +53,13 @@ android { disable 'GradleCompatible' } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } } repositories { mavenCentral() - jcenter() google() def found = false diff --git a/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java b/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java index a41c6f7df..9477d5e33 100644 --- a/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java +++ b/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java @@ -323,13 +323,10 @@ public void setCacheEnabled(WebView view, boolean enabled) { if (enabled) { Context ctx = view.getContext(); if (ctx != null) { - view.getSettings().setAppCachePath(ctx.getCacheDir().getAbsolutePath()); view.getSettings().setCacheMode(WebSettings.LOAD_DEFAULT); - view.getSettings().setAppCacheEnabled(true); } } else { view.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE); - view.getSettings().setAppCacheEnabled(false); } } @@ -523,7 +520,6 @@ public void setIncognito(WebView view, boolean enabled) { // Disable caching view.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE); - view.getSettings().setAppCacheEnabled(false); view.clearHistory(); view.clearCache(true);