-
Notifications
You must be signed in to change notification settings - Fork 936
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Casting from android.webkit #152
Comments
Facing the same issue. Did you downgrade to older version? |
Facing this issue when trying to run the example provided out of the box android.webkit.WebView cannot be cast to com.flutter_webview_plugin.ObservableWebView |
Facing the same issue when trying to run on android emulator. flutter_webview_plugin: ^0.2.1+1 [✓] Flutter (Channel beta, v0.5.1, on Mac OS X 10.13.6 17G65, locale pl-PL) ! Doctor found issues in 1 category. |
@dannysood I downgraded the plugin but still the problem persist.. |
In my case, it works after downgrading to 2.0. flutter_webview_plugin: 0.2.0 |
should be fix in |
Worked already |
D/WebView (27574): WebView
D/SettingsInterface(27574): from settings cache , name = show_password , value = 0
W/cr_AwContents(27574): onDetachedFromWindow called when already detached. Ignoring
E/MethodChannel#flutter_webview_plugin(27574): Failed to handle method call
E/MethodChannel#flutter_webview_plugin(27574): java.lang.ClassCastException: android.webkit.WebView cannot be cast to com.flutter_webview_plugin.ObservableWebView
E/MethodChannel#flutter_webview_plugin(27574): at com.flutter_webview_plugin.WebviewManager.(WebviewManager.java:102)
E/MethodChannel#flutter_webview_plugin(27574): at com.flutter_webview_plugin.FlutterWebviewPlugin.openUrl(FlutterWebviewPlugin.java:93)
E/MethodChannel#flutter_webview_plugin(27574): at com.flutter_webview_plugin.FlutterWebviewPlugin.onMethodCall(FlutterWebviewPlugin.java:42)
E/MethodChannel#flutter_webview_plugin(27574): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:191)
E/MethodChannel#flutter_webview_plugin(27574): at io.flutter.view.FlutterNativeView.handlePlatformMessage(FlutterNativeView.java:152)
E/MethodChannel#flutter_webview_plugin(27574): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#flutter_webview_plugin(27574): at android.os.MessageQueue.next(MessageQueue.java:328)
E/MethodChannel#flutter_webview_plugin(27574): at android.os.Looper.loop(Looper.java:164)
E/MethodChannel#flutter_webview_plugin(27574): at android.app.ActivityThread.main(ActivityThread.java:5763)
E/MethodChannel#flutter_webview_plugin(27574): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#flutter_webview_plugin(27574): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
E/MethodChannel#flutter_webview_plugin(27574): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
E/flutter (27574): [ERROR:topaz/lib/tonic/logging/dart_error.cc(16)] Unhandled exception:
E/flutter (27574): PlatformException(error, android.webkit.WebView cannot be cast to com.flutter_webview_plugin.ObservableWebView, null)
E/flutter (27574): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:547:7)
E/flutter (27574): #1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:279:18)
E/flutter (27574):
E/flutter (27574): #2 FlutterWebviewPlugin.launch (package:flutter_webview_plugin/src/base.dart:137:20)
E/flutter (27574):
E/flutter (27574): #3 _WebviewScaffoldState.build (package:flutter_webview_plugin/src/webview_scaffold.dart:71:24)
E/flutter (27574): #4 StatefulElement.build (package:flutter/src/widgets/framework.dart:3730:27)
E/flutter (27574): #5 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3642:15)
E/flutter (27574): #6 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
E/flutter (27574): #7 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3622:5)
E/flutter (27574): #8 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3769:11)
E/flutter (27574): #9 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3617:5)
E/flutter (27574): #10 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2907:14)
E/flutter (27574): #11 Element.updateChild (package:flutter/src/widgets/framework.dart:2710:12)
E/flutter (27574): #12 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4654:14)
E/flutter (27574): #13 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2907:14)
E/flutter (27574): #14 Element.updateChild (package:flutter/src/widgets/framework.dart:2710:12)
E/flutter (27574): #15 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
E/flutter (27574): #16 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
E/flutter (27574): #17 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3622:5)
E/flutter (27574): #18 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3617:5)
E/flutter (27574): #19 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2907:14)
E/flutter (27574): #20 Element.updateChild (package:flutter/src/widgets/framework.dart:2710:12)
E/flutter (27574): #21 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4654:14)
E/flutter (27574): #22 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2907:14)
E/flutter (27574): #23 Element.updateChild (package:flutter/src/widgets/framework.dart:2710:12)
E/flutter (27574): #24 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4654:14)
E/flutter (27574): #25 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2907:14)
E/flutter (27574): #26 Element.updateChild (package:flutter/src/widgets/framework.dart:2710:12)
E/flutter (27574): #27 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4654:14)
E/flutter (27574): #28 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2907:14)
E/flutter (27574): #29 Element.updateChild (package:flutter/src/widgets/framework.dart:2710:12)
E/flutter (27574): #30 SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:4654:14)
E/flutter (27574): #31 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2907:14)
E/flutter (27574): #32 Element.updateChild (package:flutter/src/widgets/framework.dart:2710:12)
E/flutter (27574): #33 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
E/flutter (27574): #34 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
E/flutter (27574): #35 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3622:5)
E/flutter (27574): #36 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:3769:11)
E/flutter (27574): #37 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3617:5)
E/flutter (27574): #38 Element.inflateWidget (package:flutter/src/widgets/framework.dart:2907:14)
E/flutter (27574): #39 Element.updateChild (package:flutter/src/widgets/framework.dart:2710:12)
E/flutter (27574): #40 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3653:16)
E/flutter (27574): #41 Element.rebuild (package:flutter/src/widgets/framework.dart:3495:5)
E/flutter (27574): #42 ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3622:5)
E/flutter (27574): #43 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3617:5)
E/flutter (27574): #44 Elem
My flutter Doctor
Running flutter doctor...
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v0.5.1, on Linux, locale en_US.UTF-8)
[!] Android toolchain - develop for Android devices (Android SDK 27.0.3)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[✓] Android Studio (version 3.1)
[✓] IntelliJ IDEA Community Edition (version 2018.1)
[✓] Connected devices (1 available)
! Doctor found issues in 1 category.
The text was updated successfully, but these errors were encountered: