i just bought flutter webview source code from https://docs.meetmighty.com/mightyweb/
i had follow the instruction from documentation and run the source code but unsucessfull, and shown error as follows:
E/MethodChannel#flutter/platform_views( 3411): Failed to handle method call
E/MethodChannel#flutter/platform_views( 3411): java.lang.RuntimeException: Unknown feature SUPPRESS_ERROR_PAGE
E/MethodChannel#flutter/platform_views( 3411): at androidx.webkit.internal.WebViewFeatureInternal.isSupported(WebViewFeatureInternal.java:649)
E/MethodChannel#flutter/platform_views( 3411): at androidx.webkit.internal.WebViewFeatureInternal.isSupported(WebViewFeatureInternal.java:618)
E/MethodChannel#flutter/platform_views( 3411): at androidx.webkit.WebViewFeature.isFeatureSupported(WebViewFeature.java:611)
E/MethodChannel#flutter/platform_views( 3411): at com.pichillilorenzo.flutter_inappwebview_android.webview.in_app_webview.InAppWebView.prepare(InAppWebView.java:436)
E/MethodChannel#flutter/platform_views( 3411): at com.pichillilorenzo.flutter_inappwebview_android.webview.in_app_webview.FlutterWebView.<init>(FlutterWebView.java:82)
E/MethodChannel#flutter/platform_views( 3411): at com.pichillilorenzo.flutter_inappwebview_android.webview.FlutterWebViewFactory.create(FlutterWebViewFactory.java:67)
E/MethodChannel#flutter/platform_views( 3411): at io.flutter.plugin.platform.PlatformViewsController.createPlatformView(PlatformViewsController.java:525)
E/MethodChannel#flutter/platform_views( 3411): at io.flutter.plugin.platform.PlatformViewsController$1.createForPlatformViewLayer(PlatformViewsController.java:170)
E/MethodChannel#flutter/platform_views( 3411): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.create(PlatformViewsChannel.java:105)
E/MethodChannel#flutter/platform_views( 3411): at io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:55)
E/MethodChannel#flutter/platform_views( 3411): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:267)
E/MethodChannel#flutter/platform_views( 3411): at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:292)
E/MethodChannel#flutter/platform_views( 3411): at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319)
E/MethodChannel#flutter/platform_views( 3411): at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
E/MethodChannel#flutter/platform_views( 3411): at android.os.Handler.handleCallback(Handler.java:938)
E/MethodChannel#flutter/platform_views( 3411): at android.os.Handler.dispatchMessage(Handler.java:99)
E/MethodChannel#flutter/platform_views( 3411): at android.os.Looper.loop(Looper.java:246)
E/MethodChannel#flutter/platform_views( 3411): at android.app.ActivityThread.main(ActivityThread.java:8625)
E/MethodChannel#flutter/platform_views( 3411): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#flutter/platform_views( 3411): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
E/MethodChannel#flutter/platform_views( 3411): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
E/flutter ( 3411): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(error, Unknown feature SUPPRESS_ERROR_PAGE, null, java.lang.RuntimeException: Unknown feature SUPPRESS_ERROR_PAGE
the full console log you can see on: https://pastebin.com/EhcZMS1w
i have tried: flutter clean, gradlew clean, reinstall flutter, reinstall android studio with no luck
i’d had install:
- android studio jellyfish 2023.3.1 patch 1
my java version
java 21.0.3 2024-04-16 LTS
Java(TM) SE Runtime Environment (build 21.0.3+7-LTS-152)
Java HotSpot(TM) 64-Bit Server VM (build 21.0.3+7-LTS-152, mixed mode, sharing)
flutter doctor result:
here is result after run flutter docter
hereby i attached the source code if you want to build it self: https://drive.google.com/file/d/18zlzF1WbY-bakX-RcjufMPxhEfXoidPw/view?usp=sharing
i have tried: flutter clean, gradlew clean, reinstall flutter, reinstall android studio with no luck
i’d had install:
- android studio jellyfish 2023.3.1 patch 1
the creator of source code had tried to fix this, but no success.
what should i do? sorry for my bad english. please help me.
2
Answers
I got that error too. I first used these versions of webview in pubspec.yaml.
Then I changed to these.
Finally I added this and it works.
So final set up is
I had this error too.
I downgraded from
youtube_player_flutter: ^9.0.1 to
youtube_player_flutter: ^8.0.1
This fixed it.