contentWebView.addJavascriptInterface(this, "wst");
addJavascriptInterface会出现报错,官方解决
None of the methods in the added interface (JSActivity) have been annotated with @android.webkit.JavascriptInterface; they will not be visible in API 17 less... (Ctrl+F1) As of API 17, you must annotate methods in objects registered with the addJavascriptInterface method with a @JavascriptInterface annotation. More info: http://developer.android.com/reference/android/webkit/WebView.html#addJavascriptInterface(java.lang.Object, java.lang.String)
意思就是:需要在被js调用的java方法加上注解 @JavascriptInterface