Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error:cannotfindymbolsettings.setAppCachePath(options.appCachePath);symbol:methodsetAppCachePath(String)location: variablesettings of type WebSettings

There is a flutter in-appwebview issue if any one know the solution please help

`C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flutter_inappwebview-5.4.3+7\android\src\main\java\com\pichillilorenzo\flutter_inappwebview\in_app_webview\InAppWebView.java:280: error: cannot find symbol settings.setAppCachePath(options.appCachePath); ^ symbol: method setAppCachePath(String) location: variable settings of type WebSettings C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flutter_inappwebview-5.4.3+7\android\src\main\java\com\pichillilorenzo\flutter_inappwebview\in_app_webview\InAppWebView.java:494: error: cannot find symbol settings.setAppCacheEnabled(false); ^ symbol: method setAppCacheEnabled(boolean) location: variable settings of type WebSettings C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flutter_inappwebview-5.4.3+7\android\src\main\java\com\pichillilorenzo\flutter_inappwebview\in_app_webview\InAppWebView.java:504: error: cannot find symbol settings.setAppCacheEnabled(true); ^ symbol: method setAppCacheEnabled(boolean) location: variable settings of type WebSettings C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flutter_inappwebview-5.4.3+7\android\src\main\java\com\pichillilorenzo\flutter_inappwebview\in_app_webview\InAppWebView.java:515: error: cannot find symbol settings.setAppCachePath(ctx.getCacheDir().getAbsolutePath()); ^ symbol: method setAppCachePath(String) location: variable settings of type WebSettings C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flutter_inappwebview-5.4.3+7\android\src\main\java\com\pichillilorenzo\flutter_inappwebview\in_app_webview\InAppWebView.java:517: error: cannot find symbol settings.setAppCacheEnabled(true); ^ symbol: method setAppCacheEnabled(boolean) location: variable settings of type WebSettings C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flutter_inappwebview-5.4.3+7\android\src\main\java\com\pichillilorenzo\flutter_inappwebview\in_app_webview\InAppWebView.java:521: error: cannot find symbol settings.setAppCacheEnabled(false); ^ symbol: method setAppCacheEnabled(boolean) location: variable settings of type WebSettings C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flutter_inappwebview-5.4.3+7\android\src\main\java\com\pichillilorenzo\flutter_inappwebview\in_app_webview\InAppWebView.java:767: error: cannot find symbol settings.setAppCachePath(newOptions.appCachePath); ^ symbol: method setAppCachePath(String) location: variable settings of type WebSettings Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 7 errors

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':flutter_inappwebview:compileDebugJavaWithJavac'.

Compilation failed; see the compiler error output for details.

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 11s Exception: Gradle task assembleDebug failed with exit code 1 `

like image 745
Manivannan Kumar Avatar asked Aug 12 '26 09:08

Manivannan Kumar


1 Answers

Such Methods are remove, you can see Android Developer Document

Now Only LOAD_DEFAULT is enough set this code

viewer.getSettings().setCacheMode(WebSettings.LOAD_DEFAULT)
like image 88
Sanjay Avatar answered Aug 14 '26 06:08

Sanjay



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!