flutter_inappwebview icon indicating copy to clipboard operation
flutter_inappwebview copied to clipboard

[Add to app] Running an error after integrating the plugin

Open kimmy-wang opened this issue 2 years ago • 7 comments

Environment

Technology Version
Flutter version 2.10.3
Plugin version 5.4.1+2
Android version 31
iOS version
Xcode version 13.3.1

Device information:

Description

Expected behavior:

Current behavior:

Steps to reproduce

  1. This
  2. Than that
  3. Then

Stacktrace/Logcat

> Task :flutter_inappwebview:compileDebugJavaWithJavac
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/InAppWebViewFlutterPlugin.java:20: 警告: [deprecation] io.flutter.view中的FlutterView已过时
import io.flutter.view.FlutterView;
                      ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/MyCookieManager.java:5: 警告: [deprecation] android.webkit中的CookieSyncManager已过时
import android.webkit.CookieSyncManager;
                     ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebViewClient.java:12: 警告: [deprecation] android.webkit中的CookieSyncManager已过时
import android.webkit.CookieSyncManager;
                     ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/FlutterWebViewFactory.java:25: 警告: [unchecked] 未经检查的转换
    HashMap<String, Object> params = (HashMap<String, Object>) args;
                                                               ^
  需要: HashMap<String,Object>
  找到:    Object
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/InAppWebViewFlutterPlugin.java:41: 警告: [deprecation] PluginRegistry中的Registrar已过时
  public PluginRegistry.Registrar registrar;
                       ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_browser/InAppBrowserManager.java:75: 警告: [unchecked] 未经检查的转换
        open(plugin.activity, (Map<String, Object>) call.arguments());
                                                                  ^
  需要: Map<String,Object>
  找到:    Object
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_browser/InAppBrowserManager.java:166: 警告: [unchecked] 未经检查的转换
    Map<String, Object> urlRequest = (Map<String, Object>) arguments.get("urlRequest");
                                                                        ^
  需要: Map<String,Object>
  找到:    Object
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_browser/InAppBrowserManager.java:173: 警告: [unchecked] 未经检查的转换
    Map<String, Object> options = (Map<String, Object>) arguments.get("options");
                                                                     ^
  需要: Map<String,Object>
  找到:    Object
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_browser/InAppBrowserManager.java:174: 警告: [unchecked] 未经检查的转换
    Map<String, Object> contextMenu = (Map<String, Object>) arguments.get("contextMenu");
                                                                         ^
  需要: Map<String,Object>
  找到:    Object
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_browser/InAppBrowserManager.java:176: 警告: [unchecked] 未经检查的转换
    List<Map<String, Object>> initialUserScripts = (List<Map<String, Object>>) arguments.get("initialUserScripts");
                                                                                            ^
  需要: List<Map<String,Object>>
  找到:    Object
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_browser/InAppBrowserManager.java:177: 警告: [unchecked] 未经检查的转换
    Map<String, Object> pullToRefreshInitialOptions = (Map<String, Object>) arguments.get("pullToRefreshOptions");
                                                                                         ^
  需要: Map<String,Object>
  找到:    Object
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/headless_in_app_webview/HeadlessInAppWebViewManager.java:59: 警告: [unchecked] 未经检查的转换
          HashMap<String, Object> params = (HashMap<String, Object>) call.argument("params");
                                                                                  ^
  需要: HashMap<String,Object>
  找到:    Object
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/ChromeSafariBrowserManager.java:46: 警告: [unchecked] 未经检查的转换
          HashMap<String, Object> options = (HashMap<String, Object>) call.argument("options");
                                                                                   ^
  需要: HashMap<String,Object>
  找到:    Object
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/chrome_custom_tabs/ChromeSafariBrowserManager.java:47: 警告: [unchecked] 未经检查的转换
          List<HashMap<String, Object>> menuItemList = (List<HashMap<String, Object>>) call.argument("menuItemList");
                                                                                                    ^
  需要: List<HashMap<String,Object>>
  找到:    Object
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/InAppWebViewStatic.java:62: 警告: [unchecked] 未经检查的转换
          Set<String> hosts = new HashSet<>((List<String>) call.argument("hosts"));
                                                                        ^
  需要: List<String>
  找到:    Object
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/InAppWebViewStatic.java:70: 警告: [deprecation] WebViewFeature中的SAFE_BROWSING_WHITELIST已过时
        else if (WebViewFeature.isFeatureSupported(WebViewFeature.SAFE_BROWSING_WHITELIST)) {
                                                                 ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/InAppWebViewStatic.java:71: 警告: [unchecked] 未经检查的转换
          List<String> hosts = (List<String>) call.argument("hosts");
                                                           ^
  需要: List<String>
  找到:    Object
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/InAppWebViewStatic.java:72: 警告: [deprecation] WebViewCompat中的setSafeBrowsingWhitelist(List<String>,ValueCallback<Boolean>)已过时
          WebViewCompat.setSafeBrowsingWhitelist(hosts, new ValueCallback<Boolean>() {
                       ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/InAppWebViewStatic.java:91: 警告: [unchecked] 对作为原始类型Class的成员的getMethod(String,Class<?>...)的调用未经过检查
            Method method = webViewFactory.getMethod("getLoadedPackageInfo");
                                                    ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/MyCookieManager.java:172: 警告: [deprecation] android.webkit中的CookieSyncManager已过时
      CookieSyncManager cookieSyncMngr = CookieSyncManager.createInstance(plugin.applicationContext);
      ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/MyCookieManager.java:172: 警告: [deprecation] android.webkit中的CookieSyncManager已过时
      CookieSyncManager cookieSyncMngr = CookieSyncManager.createInstance(plugin.applicationContext);
                                         ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/MyCookieManager.java:172: 警告: [deprecation] CookieSyncManager中的createInstance(Context)已过时
      CookieSyncManager cookieSyncMngr = CookieSyncManager.createInstance(plugin.applicationContext);
                                                          ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/MyCookieManager.java:173: 警告: [deprecation] CookieSyncManager中的startSync()已过时
      cookieSyncMngr.startSync();
                    ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/MyCookieManager.java:176: 警告: [deprecation] CookieSyncManager中的stopSync()已过时
      cookieSyncMngr.stopSync();
                    ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/MyCookieManager.java:177: 警告: [deprecation] CookieSyncManager中的sync()已过时
      cookieSyncMngr.sync();
                    ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/MyCookieManager.java:230: 警告: [deprecation] android.webkit中的CookieSyncManager已过时
      CookieSyncManager cookieSyncMngr = CookieSyncManager.createInstance(plugin.applicationContext);
      ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/MyCookieManager.java:230: 警告: [deprecation] android.webkit中的CookieSyncManager已过时
      CookieSyncManager cookieSyncMngr = CookieSyncManager.createInstance(plugin.applicationContext);
                                         ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/MyCookieManager.java:230: 警告: [deprecation] CookieSyncManager中的createInstance(Context)已过时
      CookieSyncManager cookieSyncMngr = CookieSyncManager.createInstance(plugin.applicationContext);
                                                          ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/MyCookieManager.java:231: 警告: [deprecation] CookieSyncManager中的startSync()已过时
      cookieSyncMngr.startSync();
                    ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/MyCookieManager.java:234: 警告: [deprecation] CookieSyncManager中的stopSync()已过时
      cookieSyncMngr.stopSync();
                    ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/MyCookieManager.java:235: 警告: [deprecation] CookieSyncManager中的sync()已过时
      cookieSyncMngr.sync();
                    ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/MyCookieManager.java:243: 警告: [deprecation] android.webkit中的CookieSyncManager已过时
    CookieSyncManager cookieSyncMngr = null;
    ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/MyCookieManager.java:249: 警告: [deprecation] android.webkit中的CookieSyncManager已过时
        cookieSyncMngr = CookieSyncManager.createInstance(plugin.applicationContext);
                         ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/MyCookieManager.java:249: 警告: [deprecation] CookieSyncManager中的createInstance(Context)已过时
        cookieSyncMngr = CookieSyncManager.createInstance(plugin.applicationContext);
                                          ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/MyCookieManager.java:250: 警告: [deprecation] CookieSyncManager中的startSync()已过时
        cookieSyncMngr.startSync();
                      ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/MyCookieManager.java:265: 警告: [deprecation] CookieSyncManager中的stopSync()已过时
        cookieSyncMngr.stopSync();
                      ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/MyCookieManager.java:266: 警告: [deprecation] CookieSyncManager中的sync()已过时
        cookieSyncMngr.sync();
                      ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/MyCookieManager.java:287: 警告: [deprecation] android.webkit中的CookieSyncManager已过时
      CookieSyncManager cookieSyncMngr = CookieSyncManager.createInstance(plugin.applicationContext);
      ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/MyCookieManager.java:287: 警告: [deprecation] android.webkit中的CookieSyncManager已过时
      CookieSyncManager cookieSyncMngr = CookieSyncManager.createInstance(plugin.applicationContext);
                                         ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/MyCookieManager.java:287: 警告: [deprecation] CookieSyncManager中的createInstance(Context)已过时
      CookieSyncManager cookieSyncMngr = CookieSyncManager.createInstance(plugin.applicationContext);
                                                          ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/MyCookieManager.java:288: 警告: [deprecation] CookieSyncManager中的startSync()已过时
      cookieSyncMngr.startSync();
                    ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/MyCookieManager.java:289: 警告: [deprecation] CookieManager中的removeAllCookie()已过时
      cookieManager.removeAllCookie();
                   ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/MyCookieManager.java:291: 警告: [deprecation] CookieSyncManager中的stopSync()已过时
      cookieSyncMngr.stopSync();
                    ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/MyCookieManager.java:292: 警告: [deprecation] CookieSyncManager中的sync()已过时
      cookieSyncMngr.sync();
                    ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/ServiceWorkerManager.java:147: 警告: [unchecked] 未经检查的转换
            Map<String, Object> res = (Map<String, Object>) flutterResult.result;
                                                                         ^
  需要: Map<String,Object>
  找到:    Object
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/ServiceWorkerManager.java:151: 警告: [unchecked] 未经检查的转换
            Map<String, String> responseHeaders = (Map<String, String>) res.get("headers");
                                                                               ^
  需要: Map<String,String>
  找到:    Object
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/headless_in_app_webview/HeadlessInAppWebView.java:49: 警告: [unchecked] 未经检查的转换
          Map<String, Object> sizeMap = (Map<String, Object>) call.argument("size");
                                                                           ^
  需要: Map<String,Object>
  找到:    Object
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/headless_in_app_webview/HeadlessInAppWebView.java:79: 警告: [unchecked] 未经检查的转换
      final Map<String, Object> initialSize = (Map<String, Object>) params.get("initialSize");
                                                                              ^
  需要: Map<String,Object>
  找到:    Object
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/FlutterWebView.java:54: 警告: [unchecked] 未经检查的转换
    Map<String, Object> initialOptions = (Map<String, Object>) params.get("initialOptions");
                                                                         ^
  需要: Map<String,Object>
  找到:    Object
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/FlutterWebView.java:55: 警告: [unchecked] 未经检查的转换
    Map<String, Object> contextMenu = (Map<String, Object>) params.get("contextMenu");
                                                                      ^
  需要: Map<String,Object>
  找到:    Object
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/FlutterWebView.java:57: 警告: [unchecked] 未经检查的转换
    List<Map<String, Object>> initialUserScripts = (List<Map<String, Object>>) params.get("initialUserScripts");
                                                                                         ^
  需要: List<Map<String,Object>>
  找到:    Object
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/FlutterWebView.java:58: 警告: [unchecked] 未经检查的转换
    Map<String, Object> pullToRefreshInitialOptions = (Map<String, Object>) params.get("pullToRefreshOptions");
                                                                                      ^
  需要: Map<String,Object>
  找到:    Object
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/FlutterWebView.java:104: 警告: [unchecked] 未经检查的转换
    Map<String, Object> initialUrlRequest = (Map<String, Object>) params.get("initialUrlRequest");
                                                                            ^
  需要: Map<String,Object>
  找到:    Object
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/FlutterWebView.java:106: 警告: [unchecked] 未经检查的转换
    final Map<String, String> initialData = (Map<String, String>) params.get("initialData");
                                                                            ^
  需要: Map<String,String>
  找到:    Object
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:136: 警告: [deprecation] Handler中的Handler()已过时
  static Handler mHandler = new Handler();
                            ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:253: 警告: [deprecation] CookieManager中的removeSessionCookie()已过时
      CookieManager.getInstance().removeSessionCookie();
                                 ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:274: 警告: [deprecation] WebSettings中的setAllowFileAccessFromFileURLs(boolean)已过时
    settings.setAllowFileAccessFromFileURLs(options.allowFileAccessFromFileURLs);
            ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:275: 警告: [deprecation] WebSettings中的setAllowUniversalAccessFromFileURLs(boolean)已过时
    settings.setAllowUniversalAccessFromFileURLs(options.allowUniversalAccessFromFileURLs);
            ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:278: 警告: [deprecation] WebSettings中的setAppCachePath(String)已过时
      settings.setAppCachePath(options.appCachePath);
              ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:315: 警告: [deprecation] WebSettings中的setSaveFormData(boolean)已过时
    settings.setSaveFormData(options.saveFormData);
            ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:487: 警告: [deprecation] CookieManager中的removeAllCookie()已过时
        CookieManager.getInstance().removeAllCookie();
                                   ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:492: 警告: [deprecation] WebSettings中的setAppCacheEnabled(boolean)已过时
      settings.setAppCacheEnabled(false);
              ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:498: 警告: [deprecation] WebSettings中的setSavePassword(boolean)已过时
      settings.setSavePassword(false);
              ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:499: 警告: [deprecation] WebSettings中的setSaveFormData(boolean)已过时
      settings.setSaveFormData(false);
              ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:502: 警告: [deprecation] WebSettings中的setAppCacheEnabled(boolean)已过时
      settings.setAppCacheEnabled(true);
              ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:503: 警告: [deprecation] WebSettings中的setSavePassword(boolean)已过时
      settings.setSavePassword(true);
              ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:504: 警告: [deprecation] WebSettings中的setSaveFormData(boolean)已过时
      settings.setSaveFormData(true);
              ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:513: 警告: [deprecation] WebSettings中的setAppCachePath(String)已过时
        settings.setAppCachePath(ctx.getCacheDir().getAbsolutePath());
                ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:515: 警告: [deprecation] WebSettings中的setAppCacheEnabled(boolean)已过时
        settings.setAppCacheEnabled(true);
                ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:519: 警告: [deprecation] WebSettings中的setAppCacheEnabled(boolean)已过时
      settings.setAppCacheEnabled(false);
              ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:560: 警告: [deprecation] CookieManager中的removeAllCookie()已过时
      CookieManager.getInstance().removeAllCookie();
                                 ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:588: 警告: [unchecked] 未经检查的转换
            Map<String, Double> rect = (Map<String, Double>) screenshotConfiguration.get("rect");
                                                                                        ^
  需要: Map<String,Double>
  找到:    Object
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:706: 警告: [deprecation] CookieManager中的removeSessionCookie()已过时
      CookieManager.getInstance().removeSessionCookie();
                                 ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:756: 警告: [deprecation] WebSettings中的setAllowFileAccessFromFileURLs(boolean)已过时
      settings.setAllowFileAccessFromFileURLs(newOptions.allowFileAccessFromFileURLs);
              ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:759: 警告: [deprecation] WebSettings中的setAllowUniversalAccessFromFileURLs(boolean)已过时
      settings.setAllowUniversalAccessFromFileURLs(newOptions.allowUniversalAccessFromFileURLs);
              ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:765: 警告: [deprecation] WebSettings中的setAppCachePath(String)已过时
      settings.setAppCachePath(newOptions.appCachePath);
              ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:858: 警告: [deprecation] WebSettings中的setSaveFormData(boolean)已过时
      settings.setSaveFormData(newOptions.saveFormData);
              ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:1380: 警告: [unchecked] 未经检查的转换
      customMenuItems = (List<Map<String, Object>>) contextMenu.get("menuItems");
                                                                   ^
  需要: List<Map<String,Object>>
  找到:    Object
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:1381: 警告: [unchecked] 未经检查的转换
      Map<String, Object> contextMenuOptionsMap = (Map<String, Object>) contextMenu.get("options");
                                                                                       ^
  需要: Map<String,Object>
  找到:    Object
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:1458: 警告: [deprecation] AbsoluteLayout中的LayoutParams已过时
      addView(floatingContextMenu, new LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT, x, y));
                                       ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:1458: 警告: [deprecation] LayoutParams中的LayoutParams(int,int,int,int)已过时
      addView(floatingContextMenu, new LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT, x, y));
                                   ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:1489: 警告: [deprecation] AbsoluteLayout中的LayoutParams已过时
            new LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT, curx, ((int) cury) + getScrollY())
                ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:1489: 警告: [deprecation] LayoutParams中的LayoutParams(int,int,int,int)已过时
            new LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT, curx, ((int) cury) + getScrollY())
            ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/InAppWebViewMethodHandler.java:61: 警告: [unchecked] 未经检查的转换
          Map<String, Object> urlRequest = (Map<String, Object>) call.argument("urlRequest");
                                                                              ^
  需要: Map<String,Object>
  找到:    Object
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/InAppWebViewMethodHandler.java:101: 警告: [unchecked] 未经检查的转换
          Map<String, Object> contentWorldMap = (Map<String, Object>) call.argument("contentWorld");
                                                                                   ^
  需要: Map<String,Object>
  找到:    Object
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/InAppWebViewMethodHandler.java:117: 警告: [unchecked] 未经检查的转换
          Map<String, Object> scriptHtmlTagAttributes = (Map<String, Object>) call.argument("scriptHtmlTagAttributes");
                                                                                           ^
  需要: Map<String,Object>
  找到:    Object
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/InAppWebViewMethodHandler.java:132: 警告: [unchecked] 未经检查的转换
          Map<String, Object> cssLinkHtmlTagAttributes = (Map<String, Object>) call.argument("cssLinkHtmlTagAttributes");
                                                                                            ^
  需要: Map<String,Object>
  找到:    Object
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/InAppWebViewMethodHandler.java:176: 警告: [unchecked] 未经检查的转换
          Map<String, Object> screenshotConfiguration = (Map<String, Object>) call.argument("screenshotConfiguration");
                                                                                           ^
  需要: Map<String,Object>
  找到:    Object
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/InAppWebViewMethodHandler.java:186: 警告: [unchecked] 未经检查的转换
          HashMap<String, Object> inAppBrowserOptionsMap = (HashMap<String, Object>) call.argument("options");
                                                                                                  ^
  需要: HashMap<String,Object>
  找到:    Object
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/InAppWebViewMethodHandler.java:191: 警告: [unchecked] 未经检查的转换
          HashMap<String, Object> inAppWebViewOptionsMap = (HashMap<String, Object>) call.argument("options");
                                                                                                  ^
  需要: HashMap<String,Object>
  找到:    Object
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/InAppWebViewMethodHandler.java:420: 警告: [unchecked] 未经检查的转换
          Map<String, Object> contextMenu = (Map<String, Object>) call.argument("contextMenu");
                                                                               ^
  需要: Map<String,Object>
  找到:    Object
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/InAppWebViewMethodHandler.java:468: 警告: [unchecked] 未经检查的转换
          Map<String, Object> userScriptMap = (Map<String, Object>) call.argument("userScript");
                                                                                 ^
  需要: Map<String,Object>
  找到:    Object
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/InAppWebViewMethodHandler.java:478: 警告: [unchecked] 未经检查的转换
          Map<String, Object> userScriptMap = (Map<String, Object>) call.argument("userScript");
                                                                                 ^
  需要: Map<String,Object>
  找到:    Object
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/InAppWebViewMethodHandler.java:501: 警告: [unchecked] 未经检查的转换
          Map<String, Object> functionArguments = (Map<String, Object>) call.argument("arguments");
                                                                                     ^
  需要: Map<String,Object>
  找到:    Object
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/InAppWebViewMethodHandler.java:502: 警告: [unchecked] 未经检查的转换
          Map<String, Object> contentWorldMap = (Map<String, Object>) call.argument("contentWorld");
                                                                                   ^
  需要: Map<String,Object>
  找到:    Object
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/InAppWebViewMethodHandler.java:540: 警告: [unchecked] 未经检查的转换
          Map<String, Object> message = (Map<String, Object>) call.argument("message");
                                                                           ^
  需要: Map<String,Object>
  找到:    Object
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/InAppWebViewMethodHandler.java:544: 警告: [unchecked] 未经检查的转换
          List<Map<String, Object>> portsMap = (List<Map<String, Object>>) message.get("ports");
                                                                                      ^
  需要: List<Map<String,Object>>
  找到:    Object
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/InAppWebViewMethodHandler.java:572: 警告: [unchecked] 未经检查的转换
          Map<String, Object> webMessageListenerMap = (Map<String, Object>) call.argument("webMessageListener");
                                                                                         ^
  需要: Map<String,Object>
  找到:    Object
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebViewClient.java:101: 警告: [deprecation] WebViewClient中的shouldOverrideUrlLoading(WebView,String)已过时
  public boolean shouldOverrideUrlLoading(WebView webView, String url) {
                 ^
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebViewClient.java:134: 警告: [unchecked] 未经检查的转换
          Map<String, Object> responseMap = (Map<String, Object>) response;
                                                                  ^
  需要: Map<String,Object>
  找到:    Object
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebViewChromeClient.java:234: 错误: 找不到符号
    AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(activity, R.style.Theme_AppCompat_Dialog_Alert);
                                                                                      ^
  符号:   变量 Theme_AppCompat_Dialog_Alert
  位置: 类 style
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebViewChromeClient.java:327: 错误: 找不到符号
    AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(activity, R.style.Theme_AppCompat_Dialog_Alert);
                                                                                      ^
  符号:   变量 Theme_AppCompat_Dialog_Alert
  位置: 类 style
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebViewChromeClient.java:446: 错误: 找不到符号
    AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(activity, R.style.Theme_AppCompat_Dialog_Alert);
                                                                                      ^
  符号:   变量 Theme_AppCompat_Dialog_Alert
  位置: 类 style
/Users/ying/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.1+2/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebViewChromeClient.java:544: 错误: 找不到符号
      AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(activity, R.style.Theme_AppCompat_Dialog_Alert);
                                                                                        ^
  符号:   变量 Theme_AppCompat_Dialog_Alert
  位置: 类 style
注: 某些输入文件还使用或覆盖了已过时的 API。
注: 某些输入文件还使用了未经检查或不安全的操作。
4 个错误
100 个警告

> Task :flutter_inappwebview:compileDebugJavaWithJavac FAILED

kimmy-wang avatar Apr 25 '22 13:04 kimmy-wang

👋 @see

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 Apr 25 '22 13:04 github-actions[bot]

Try to clean the project and build it again

pichillilorenzo avatar Apr 25 '22 14:04 pichillilorenzo

It doesn't work for me.

kimmy-wang avatar Apr 25 '22 14:04 kimmy-wang

I have just created a new fresh flutter example app and added flutter_inappwebview: 5.4.1+2 as a dependency and I can compile and run it without any problem. Maybe you can try to clean the cache of dart pub: dart pub cache clean (see https://dart.dev/tools/pub/cmd/pub-cache#clearing-the-global-system-cache) and try to reinstall all of your dependencies. Other than that I don't know what it could be. From your logs, even the io.flutter.view.FlutterView class is recognized and it's a native Flutter class! So you have some problems with the Java native side in general.

pichillilorenzo avatar Apr 25 '22 14:04 pichillilorenzo

https://github.com/alisoft/flutter-hybird

kimmy-wang avatar Apr 26 '22 11:04 kimmy-wang

I have the same problem

apkcoder avatar May 19 '22 12:05 apkcoder

image

can you fix this bug in Xcode 14?

wf1992 avatar Sep 13 '22 06:09 wf1992

This error is happening when I tried to convert my Flutter app to a Flutter module (add-to-app to the native android app). The build failed when I build the native host app.

Screen Shot 2022-10-27 at 7 14 21 PM

On the contrary, I can successfully build the Flutter app. The Flutter app is using:

  • compileSdkVersion 31
  • targetSdkVersion 30

I tried to use those SDK versions in the host app but the error still occurs

tijanirf avatar Oct 27 '22 12:10 tijanirf

Try to clean the project and build it again

it doesn't work for me

buildscript {
    ext.kotlin_version = '1.7.10'
    ext {
        compileSdkVersion = 30
        targetSdkVersion = 30
        appCompatVersion = "1.1.0"
    }
    repositories {
        google()
        mavenCentral()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:7.3.1'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
//        classpath 'com.google.gms:google-services:4.3.14'
    }
}

pishguy avatar Nov 10 '22 08:11 pishguy