Open arnaudelub opened 3 years ago
Any updates on this? I'm facing the same issue.
The recommended version is still set to 3.4.x so you'll have to manually set it to the latest. As of writing this is: ^4.0.0+4
Cheers!
I also get this error when I run in Release Mode, and include the file_picker plugin. If I remove the file_picker, I don't get an error.
I get it on any API version, not just 21.
E/flutter (26973): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: PlatformException(error, java.lang.IllegalStateException: Trying to create a platform view of unregistered type: com.pichillilorenzo/flutter_inappwebview
E/flutter (26973): at io.flutter.plugin.platform.j$a.d(Unknown Source:229)
E/flutter (26973): at io.flutter.embedding.engine.i.i$a.b(Unknown Source:152)
E/flutter (26973): at io.flutter.embedding.engine.i.i$a.k(Unknown Source:144)
E/flutter (26973): at g.a.d.a.j$a.a(Unknown Source:17)
E/flutter (26973): at io.flutter.embedding.engine.e.b.e(Unknown Source:57)
E/flutter (26973): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(Unknown Source:4)
E/flutter (26973): at android.os.MessageQueue.nativePollOnce(Native Method)
E/flutter (26973): at android.os.MessageQueue.next(MessageQueue.java:326)
E/flutter (26973): at android.os.Looper.loop(Looper.java:181)
E/flutter (26973): at android.app.ActivityThread.main(ActivityThread.java:7156)
E/flutter (26973): at java.lang.reflect.Method.invoke(Native Method)
E/flutter (26973): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
E/flutter (26973): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975)
E/flutter (26973): , null, null)
E/flutter (26973): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:582)
E/flutter (26973): #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:159)
E/flutter (26973):
any news on this one ?
Have you tried the latest version?
I have faced the same on latest version, but found a solution: just flutter clean
, close the app on emulator or real device, finally run the app
I had tried flutter clean
and flutter pub cache repair
but not worked. Using the latest version flutter_inappwebview: ^5.7.2+3.
`[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(error, java.lang.IllegalStateException: Trying to create a platform view of unregistered type: com.pichillilorenzo/flutter_inappwebview at io.flutter.plugin.platform.PlatformViewsController$a.m(SourceFile:11) at io.flutter.plugin.platform.PlatformViewsController$a.h(SourceFile:6) at io.flutter.embedding.engine.systemchannels.k$a.b(SourceFile:23) at io.flutter.embedding.engine.systemchannels.k$a.onMethodCall(SourceFile:12) at io.flutter.plugin.common.h$a.a(SourceFile:2) at io.flutter.embedding.engine.dart.c.h(SourceFile:2) at io.flutter.embedding.engine.dart.c.i(SourceFile:3) at io.flutter.embedding.engine.dart.c.j(Unknown Source:0) at io.flutter.embedding.engine.dart.a.run(Unknown Source:12) at android.os.Handler.handleCallback(Handler.java:942) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at android.app.ActivityThread.main(ActivityThread.java:8757) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067) , null, null)
#1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:315)
<asynchronous suspension>
#2 SurfaceAndroidViewController._sendCreateMessage (package:flutter/src/services/platform_views.dart:1017)
<asynchronous suspension>
#3 AndroidViewController.create (package:flutter/src/services/platform_views.dart:801)
<asynchronous suspension>
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method setCookie on channel com.pichillilorenzo/flutter_inappwebview_cookiemanager)
<asynchronous suspension>
#1 CookieManager.setCookie (package:flutter_inappwebview/src/cookie_manager.dart:98)
<asynchronous suspension>`
Device information: EMULATOR
Description
Running the example throw a platformException
Expected behavior: inappwebview should print the webpage correclty
Current behavior: Receiving a platform exception
Steps to reproduce
Stacktrace/Logcat
Issue in my app with same version of Android
Device information: EMULATOR
Description
I am actually using this plugin on the app i am building actually, there is no PlatformException though when launching the app on Android 5.0.2 but apparently there is an issue with Javascript as controller.evaluateJavascript doesn't work.
Expected behavior: inappwebview should execute JS correctly
Current behavior: Nothing happen
Code