ProGuard obfuscating classes even after `keep class` flag. Affecting Android WebView behavior

后端 未结 2 2035
青春惊慌失措
青春惊慌失措 2021-01-06 23:25

I\'m using ProGuard to obfuscate my Android app.

I\'m also using WebView to show a webpage (an HTML walkthrough page) that contains a button that will c

2条回答
  •  花落未央
    2021-01-07 00:02

    You can instruct ProGuard to keep all annotated methods:

    -keepclassmembers class * {
        @android.webkit.JavascriptInterface ;
    }
    

    This should probably be part of the default configuration in the Android SDK.

自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题