Skip to content

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

Open
@shenlanchenwei

Description

@shenlanchenwei

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

Activity

hacjy

hacjy commented on Nov 10, 2021

@hacjy

I have same question.

shenlanchenwei

shenlanchenwei commented on Nov 10, 2021

@shenlanchenwei
Author

I have same question.

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

hacjy

hacjy commented on Nov 10, 2021

@hacjy

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

shenlanchenwei

shenlanchenwei commented on Dec 13, 2021

@shenlanchenwei
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @shenlanchenwei@hacjy

        Issue actions

          JavascriptChannel in Normal in debug mode, not working in release mode · Issue #922 · fluttercommunity/flutter_webview_plugin