flutter_inappwebview icon indicating copy to clipboard operation
flutter_inappwebview copied to clipboard

error: cannot find symbol settings.setAppCachePath(...)

Open moein-keyvani-pur opened this issue 1 year ago • 9 comments

when I add this package to my project it's ok but when I try to run the app I get the bottom error and use discover all packages I find this package has conflict with permission_handler: ^10.0.0 :

      settings.setAppCachePath(options.appCachePath);
              ^
  symbol:   method setAppCachePath(String)
  location: variable settings of type WebSettings
C:\src\flutter_windows_2.10.4-stable\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_windows_2.10.4-stable\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_windows_2.10.4-stable\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_windows_2.10.4-stable\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_windows_2.10.4-stable\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
 cupertino_icons: ^1.0.2
  flutter_bloc: ^8.0.1
  flutter_screenutil: ^5.5.2
  font_awesome_flutter: ^10.1.0
  flutter_svg: ^1.0.3
  carousel_slider: ^4.1.1
  flutter_staggered_animations: ^1.0.0
  url_strategy: ^0.2.0
  # beamer: ^1.4.1+1
  intl: ^0.17.0
  qr_flutter: ^4.0.0
  dio: ^4.0.6
  shared_preferences: ^2.0.15
  signalr_core: ^1.1.1
  lottie: ^1.3.0
  permission_handler: ^10.0.0
  connectivity_plus: ^2.3.5
  jalali_calendar:
    git: https://github.com/erfanegtfi/jalali_calendar
  file_picker: ^4.6.1
  # url_launcher: ^6.1.4
  # flutter_widget_from_html_core: ^0.8.5+3
  # webview_flutter: ^3.0.4
  # webview_flutter: ^3.0.4
  flutter_inappwebview:
  interactive_chart: ^0.3.4
  get_it: ^7.2.0

moein-keyvani-pur avatar Aug 01 '22 11:08 moein-keyvani-pur

👋 @moein-keyvani-pur

NOTE: This comment is auto-generated.

Are you sure you have already searched for the same problem?

Some people open new issues but they didn't search for something similar or for the same issue. Please, search for it using the GitHub issue search box or on the official inappwebview.dev website, or, also, using Google, StackOverflow, etc. before posting a new one. You may already find an answer to your problem!

If this is really a new issue, then thank you for raising it. I will investigate it and get back to you as soon as possible. Please, make sure you have given me as much context as possible! Also, if you didn't already, post a code example that can replicate this issue.

In the meantime, you can already search for some possible solutions online! Because this plugin uses native WebView, you can search online for the same issue adding android WebView [MY ERROR HERE] or ios WKWebView [MY ERROR HERE] keywords.

Following these steps can save you, me, and other people a lot of time, thanks!

github-actions[bot] avatar Aug 01 '22 11:08 github-actions[bot]

This happens when you use compilesdk 33 for Android

mala-dev avatar Aug 23 '22 11:08 mala-dev

This happens when you use compilesdk 33 for Android

what is the solution for this?

Sunsiha avatar Aug 24 '22 16:08 Sunsiha

You should go back to API level 32 if possible. Some plugins complain when building but works anyway. I just had to revert one plugin, flutter_local_notifications to an older release to get everything working.

mala-dev avatar Aug 24 '22 17:08 mala-dev

You should go back to API level 32 if possible. Some plugins complain when building but works anyway. I just had to revert one plugin, flutter_local_notifications to an older release to get everything working.

which version you are using?

Sunsiha avatar Aug 24 '22 17:08 Sunsiha

@Sunsiha @mala-dev a working solution is mentioned in this thread here

railsdevp avatar Aug 24 '22 18:08 railsdevp

@Sunsiha @mala-dev a working solution is mentioned in this thread here

Yes, but I'm not comfortable using a random fork for my project. That's how you get backdoored software. The only other solution is to fork this repo and make the changes yourself.

mala-dev avatar Aug 24 '22 19:08 mala-dev

@Sunsiha @mala-dev a working solution is mentioned in this thread here

Yes, but I'm not comfortable using a random fork for my project. That's how you get backdoored software. The only other solution is to fork this repo and make the changes yourself.

Oh! All the best then :)

railsdevp avatar Aug 25 '22 12:08 railsdevp

upgrade your gradle version

Stitch-Taotao avatar Sep 03 '22 03:09 Stitch-Taotao

Hello good morning, I was researching and I found a quick solution, as I always get good answers I leave you as a solution in a video. I hope it serves you greetings :D

https://youtu.be/JjvFjbC248g

rodomedina avatar Aug 31 '23 15:08 rodomedina