瀏覽代碼

fix bug android webview httperror #491

古科明 6 年之前
父節點
當前提交
cf89f5d953
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      android/src/main/java/com/flutter_webview_plugin/BrowserClient.java

+ 1 - 1
android/src/main/java/com/flutter_webview_plugin/BrowserClient.java

@@ -104,7 +104,7 @@ public class BrowserClient extends WebViewClient {
         super.onReceivedError(view, errorCode, description, failingUrl);
         Map<String, Object> data = new HashMap<>();
         data.put("url", failingUrl);
-        data.put("code", errorCode);
+        data.put("code", Integer.toString(errorCode));
         FlutterWebviewPlugin.channel.invokeMethod("onHttpError", data);
     }