Proguard stops Javascript in WebView from working

后端 未结 1 1909
梦谈多话
梦谈多话 2021-01-12 11:15

I have a class JSBridge (an inner class) which is a javascript interface:

private class JsBridge implements JsCallback {

    /**
     * @param handlerName m         


        
相关标签:
1条回答
  • 2021-01-12 11:49

    If your Javascript interface methods are annotated with @JavascriptInterface, you can preserve them with

    -keepclassmembers class * {
        @android.webkit.JavascriptInterface <methods>;
    }
    
    0 讨论(0)
提交回复
热议问题