flutter_webview_plugin icon indicating copy to clipboard operation
flutter_webview_plugin copied to clipboard

JavascriptChannel in Normal in debug mode, not working in release mode

Open shenlanchenwei opened this issue 4 years ago • 4 comments

image Issue occurs on: Android Plugin version:4.0

There is no postMessage method in release mode

image

There is a postMessage method in debug mode image

shenlanchenwei avatar Sep 14 '21 08:09 shenlanchenwei

I have same question.

hacjy avatar Nov 10 '21 03:11 hacjy

I have same question.

Android obfuscation program causes this problem, closing it can solve this problem

shenlanchenwei avatar Nov 10 '21 06:11 shenlanchenwei

Thank you ! @shenlanchenwei Turn off obfuscation or add the code "- keep class com.fluent_ webview_ Plugin. * * {*;}" in the obfuscation file, this problem is solved.

hacjy avatar Nov 10 '21 07:11 hacjy

The namespace is not "com.fluent_ webview_ Plugin", it should be "-keep class com.flutter_webview_plugin.** { *; }" ^_^

shenlanchenwei avatar Dec 13 '21 08:12 shenlanchenwei