fluttercommunity / flutter_webview_plugin

Community WebView Plugin - Allows Flutter to communicate with a native WebView.
https://pub.dev/packages/flutter_webview_plugin
Other
1.48k stars 929 forks source link

Build failed on Android Target SDK 33 #963

Open Louna-akkad1 opened 1 year ago

Louna-akkad1 commented 1 year ago

trying to build my app n Android Target SDK 33

cannot find symbol webView.getSettings().setAppCacheEnabled(appCacheEnabled); ^ symbol: method setAppCacheEnabled(boolean) location: class WebSettings

i can not downgrade my Target is there is a way to fix this ?

fedotxxl commented 10 months ago

Copied locally, changed to

        webView.getSettings().setCacheMode((appCacheEnabled) ? WebSettings.LOAD_DEFAULT : WebSettings.LOAD_NO_CACHE);

Copied from https://github.com/react-native-webview/react-native-webview/pull/2583/files/f19acb21bb44b417bf2a51ddeb02d4b52d81ef44#diff-e9700631fc9fa5600d2e1ee70eb2d28aa2a1fbc695b85f99981972d3904ca485