fluttercommunity / flutter_webview_plugin

Community WebView Plugin - Allows Flutter to communicate with a native WebView.

Home Page:https://pub.dev/packages/flutter_webview_plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

shenlanchenwei opened this issue · 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

commented

I have same question.

I have same question.

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

commented

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

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